From: luowei Date: Tue, 3 Sep 2013 10:47:51 +0000 (+0800) Subject: add board id to support OneImage solution X-Git-Tag: firefly_0821_release~6665^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7ab06c4331008945c439387f7dd9e6e03db2014e;p=firefly-linux-kernel-4.4.55.git add board id to support OneImage solution --- diff --git a/arch/arm/plat-rk/Kconfig b/arch/arm/plat-rk/Kconfig index 4ec8fea9c287..2e12de51e2ef 100755 --- a/arch/arm/plat-rk/Kconfig +++ b/arch/arm/plat-rk/Kconfig @@ -123,6 +123,7 @@ config RK_CLOCK_PROC depends on PROC_FS source arch/arm/plat-rk/rk_pm_tests/Kconfig +source arch/arm/plat-rk/bid/Kconfig if !ARCH_RK29 menu "Support for RK power manage" diff --git a/arch/arm/plat-rk/Makefile b/arch/arm/plat-rk/Makefile index 73c2524089b3..3e80a937bc0e 100755 --- a/arch/arm/plat-rk/Makefile +++ b/arch/arm/plat-rk/Makefile @@ -19,3 +19,4 @@ obj-$(CONFIG_DVFS) += dvfs.o obj-y += pwm.o obj-$(CONFIG_RK_TIMER) += rk_timer.o obj-$(CONFIG_RK_PM_TESTS) += rk_pm_tests/ +obj-$(CONFIG_BOARD_ID) += bid/ diff --git a/arch/arm/plat-rk/bid/Kconfig b/arch/arm/plat-rk/bid/Kconfig new file mode 100755 index 000000000000..6e14bc9c4022 --- /dev/null +++ b/arch/arm/plat-rk/bid/Kconfig @@ -0,0 +1,19 @@ +menuconfig BOARD_ID + bool "board id support for OneImage solution" + default n + +choice + depends on BOARD_ID + prompt "board id type" + +config BOARD_ID_FLASH +bool "board id save in flash" + +config BOARD_ID_AUTO_XML +bool "auto print cust.xml" + depends on BOARD_ID_FLASH + +config BOARD_ID_HW +bool "board id get from hardware such as gpios" + +endchoice diff --git a/arch/arm/plat-rk/bid/Makefile b/arch/arm/plat-rk/bid/Makefile new file mode 100755 index 000000000000..dacc5df0e9ff --- /dev/null +++ b/arch/arm/plat-rk/bid/Makefile @@ -0,0 +1,5 @@ +# rockchip board id select devices + +obj-$(CONFIG_BOARD_ID) += board-id.o +obj-$(CONFIG_BOARD_ID_FLASH) += board-id-flash.o +obj-$(CONFIG_BOARD_ID_HW) += board-id-hw.o diff --git a/arch/arm/plat-rk/bid/board-id-flash.c b/arch/arm/plat-rk/bid/board-id-flash.c new file mode 100755 index 000000000000..5d80d3650f4d --- /dev/null +++ b/arch/arm/plat-rk/bid/board-id-flash.c @@ -0,0 +1,870 @@ +#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 +#include +#include +#include +#include + + +#include + + +extern struct board_id_private_data *g_board_id; + +#if defined(CONFIG_BOARD_ID_AUTO_XML) + +#define MAX_BUF_LEN 200 +static ssize_t board_id_proc_write(struct file *file, const char __user *buffer, + size_t count, loff_t *data) +{ + char c; + int rc; + int i = 0, num = 0, j = 0; + struct board_id_private_data *board_id = g_board_id; + char buf[MAX_BUF_LEN]; + struct device_id_name *device_id_name_start = board_id->tp_id_name; + struct area_id_name *area_id_name_start = board_id->area_area_id_name; + int max_id = TP_ID_NUMS + LCD_ID_NUMS + KEY_ID_NUMS + CODEC_ID_NUMS + WIFI_ID_NUMS + BT_ID_NUMS + GPS_ID_NUMS + FM_ID_NUMS + MODEM_ID_NUMS + DDR_ID_NUMS + FLASH_ID_NUMS + HDMI_ID_NUMS + + BATTERY_ID_NUMS + CHARGE_ID_NUMS + BACKLIGHT_ID_NUMS + HEADSET_ID_NUMS + MICPHONE_ID_NUMS + SPEAKER_ID_NUMS + VIBRATOR_ID_NUMS + TV_ID_NUMS + + ECHIP_ID_NUMS + HUB_ID_NUMS + TPAD_ID_NUMS + PMIC_ID_NUMS + REGULATOR_ID_NUMS + RTC_ID_NUMS + CAMERA_FRONT_ID_NUMS + CAMERA_BACK_ID_NUMS + ANGLE_ID_NUMS + ACCEL_ID_NUMS + + COMPASS_ID_NUMS + GYRO_ID_NUMS + LIGHT_ID_NUMS + PROXIMITY_ID_NUMS + TEMPERATURE_ID_NUMS + PRESSURE_ID_NUMS; + + rc = get_user(c, buffer); + if (rc) + { + atomic_set(&board_id->flags.debug_flag, 0); + return rc; + } + + + num = c - '0'; + + printk("%s command list:debug close:0,debug enable:1, create /data/board-id-data.txt :2, create /data/board-id-cust.xml:3, create /data/board-id-device.xml :4\n",__func__); + + switch(num) + { + case 0: + case 1: + if(board_id) + atomic_set(&board_id->flags.debug_flag, num); + break; + + case 2: + printk("%s:create /data/board-id-data.txt file\n",__func__); + if(!board_id->board_id_data_filp) + board_id->board_id_data_filp = filp_open("/data/board-id-data.txt",O_CREAT|O_TRUNC|O_RDWR,0); + + if (board_id->board_id_data_filp) + { + board_id->board_id_data_fs = get_fs(); + set_fs(get_ds()); + } + + memset(buf, 0, MAX_BUF_LEN); + for(i=0; itype && *device_id_name_start->dev_name) + { + snprintf(buf, MAX_BUF_LEN, "type=%d,id=%d,name=%s:%s,%d", device_id_name_start->type, device_id_name_start->id, device_id_name_start->dev_name, device_id_name_start->description, device_id_name_start->device_id); + buf[MAX_BUF_LEN-1] = '\n'; + board_id->board_id_data_filp->f_op->write(board_id->board_id_data_filp, buf, MAX_BUF_LEN, &board_id->board_id_data_filp->f_pos); + } + memset(buf,0,MAX_BUF_LEN); + device_id_name_start++; + } + + memset(buf, '\n', MAX_BUF_LEN); + board_id->board_id_data_filp->f_op->write(board_id->board_id_data_filp, buf, 3, &board_id->board_id_data_filp->f_pos); + device_id_name_start = board_id->device_selected; + memset(buf, 0, MAX_BUF_LEN); + for(i=0; itype && *device_id_name_start->dev_name) + { + snprintf(buf, MAX_BUF_LEN, "device_selected: type=%d,id=%d,name=%s:%s,%d", device_id_name_start->type, device_id_name_start->id, device_id_name_start->dev_name, device_id_name_start->description, device_id_name_start->device_id); + buf[MAX_BUF_LEN-1] = '\n'; + board_id->board_id_data_filp->f_op->write(board_id->board_id_data_filp, buf, MAX_BUF_LEN, &board_id->board_id_data_filp->f_pos); + } + memset(buf, 0, MAX_BUF_LEN); + device_id_name_start++; + } + + memset(buf, '\n', MAX_BUF_LEN); + board_id->board_id_data_filp->f_op->write(board_id->board_id_data_filp, buf, 3, &board_id->board_id_data_filp->f_pos); + area_id_name_start = board_id->area_area_id_name; + memset(buf, 0, MAX_BUF_LEN); + for(i=AREA_ID_NULL; itype && (strlen(area_id_name_start->locale_language) > 0)) + { + if(i == AREA_ID_NUMS) + snprintf(buf, MAX_BUF_LEN, "area_selected: type=%d,id=%d,name=%s_%s", area_id_name_start->type, area_id_name_start->id, area_id_name_start->locale_language, area_id_name_start->locale_region); + else + snprintf(buf, MAX_BUF_LEN, "type=%d,id=%d,name=%s_%s", area_id_name_start->type, area_id_name_start->id, area_id_name_start->locale_language, area_id_name_start->locale_region); + buf[MAX_BUF_LEN-1] = '\n'; + board_id->board_id_data_filp->f_op->write(board_id->board_id_data_filp, buf, MAX_BUF_LEN, &board_id->board_id_data_filp->f_pos); + } + memset(buf, 0, MAX_BUF_LEN); + area_id_name_start++; + } + + + break; + + case 3: + + if(!board_id->board_id_area_filp) + board_id->board_id_area_filp = filp_open("/data/board-id-cust.xml",O_CREAT|O_TRUNC|O_RDWR,0); + + if (board_id->board_id_area_filp) + { + board_id->board_id_area_fs = get_fs(); + set_fs(get_ds()); + } + + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, "\n", 40, &board_id->board_id_area_filp->f_pos); + + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, "\n", 7, &board_id->board_id_area_filp->f_pos); + + area_id_name_start = board_id->area_area_id_name; + memset(buf, 0, MAX_BUF_LEN); + for(i=AREA_ID_NULL; itype && (strlen(area_id_name_start->locale_language) > 0) && (strlen(area_id_name_start->locale_region) > 0)) + + { + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\n",area_id_name_start->type, area_id_name_start->id, area_id_name_start->country_area); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\t\n\t\t\n\t\t\n", area_id_name_start->locale_language, area_id_name_start->locale_region, area_id_name_start->timezone); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\t\n\t\t\n", area_id_name_start->locale_language, area_id_name_start->locale_region); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + //memset(buf, 0, MAX_BUF_LEN); + //snprintf(buf, MAX_BUF_LEN, "\t\t\n \t\t\n"); + //board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + for(j=0; j\n", gms_name[j].gms_name, gms_name[j].gms_name); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + } + } + + // + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\n"); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + + } + + memset(buf, 0, MAX_BUF_LEN); + if(i < AREA_ID_NUMS) + area_id_name_start++; + + } + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\n"); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\t\n \t\t\n\t\n"); + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, buf, MAX_BUF_LEN, &board_id->board_id_area_filp->f_pos); + + board_id->board_id_area_filp->f_op->write(board_id->board_id_area_filp, "\n", 8, &board_id->board_id_area_filp->f_pos); + + printk("%s:/data/board-id-cust.xml file\n",__func__); + break; + + + case 4: + if(!board_id->board_id_device_filp) + board_id->board_id_device_filp = filp_open("/data/board-id-device.xml",O_CREAT|O_TRUNC|O_RDWR,0); + + if (board_id->board_id_device_filp) + { + board_id->board_id_device_fs = get_fs(); + set_fs(get_ds()); + } + + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, "\n", 40, &board_id->board_id_device_filp->f_pos); + + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, "\n", 9, &board_id->board_id_device_filp->f_pos); + + device_id_name_start = board_id->tp_id_name; + memset(buf, 0, MAX_BUF_LEN); + + for(i=DEVICE_TYPE_TP; idevice_start_addr[i]; + + device_id_name_start = board_id->tp_id_name; + + for(j=0; jtype == i) && (strlen(device_id_name_start->dev_name) > 0)) + { + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\n", device_id_name_start->type, device_id_name_start->id, device_id_name_start->type_name, device_id_name_start->dev_name, device_id_name_start->description); + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, buf, MAX_BUF_LEN, &board_id->board_id_device_filp->f_pos); + + if(DEVICE_TYPE_KEY == device_id_name_start->type) + { + memset(buf, 0, MAX_BUF_LEN); //added by luodh + snprintf(buf, MAX_BUF_LEN, "\t\t\n", device_id_name_start->dev_name); + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, buf, MAX_BUF_LEN, &board_id->board_id_device_filp->f_pos); + } + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\t\n \t\t\n"); + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, buf, MAX_BUF_LEN, &board_id->board_id_device_filp->f_pos); + + memset(buf, 0, MAX_BUF_LEN); + snprintf(buf, MAX_BUF_LEN, "\t\n"); + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, buf, MAX_BUF_LEN, &board_id->board_id_device_filp->f_pos); + + memset(buf, 0, MAX_BUF_LEN); + + //printk("%s:type=%d,id=%d\n",__func__,device_id_name_start->type, device_id_name_start->id); + + } + + device_id_name_start++; + + } + + memset(buf, 0, MAX_BUF_LEN); + + } + + //board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, "\t\n", 9, &board_id->board_id_device_filp->f_pos); + + board_id->board_id_device_filp->f_op->write(board_id->board_id_device_filp, "\n", 10, &board_id->board_id_device_filp->f_pos); + + printk("%s:/data/board-id-device.xml file\n",__func__); + break; + + default: + break; + + } + + printk("%s %d\n", __func__, __LINE__); + return count; +} + +static const struct file_operations board_id_proc_fops = { + .owner = THIS_MODULE, + .write = board_id_proc_write, +}; + +#endif + +static int board_id_open(struct inode *inode, struct file *file) +{ + struct board_id_private_data *board_id = g_board_id; + + return 0; +} + +static int board_id_release(struct inode *inode, struct file *file) +{ + struct board_id_private_data *board_id = g_board_id; + + return 0; +} + +static struct device_id_name device_selected[DEVICE_NUM_TYPES]; + +static long board_id_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + struct board_id_private_data *board_id = g_board_id; + void __user *argp = (void __user *)arg; + struct area_id_name area_select = board_id->area_select; + struct operator_id_name operator_select = board_id->operator_select; + struct reserve_id_name reserve_select = board_id->reserve_select; + struct device_id_name device_selected_temp, device_selected_last_temp; + struct area_id_name language_last_select; + struct operator_id_name operator_last_select; + struct reserve_id_name reserve_last_select; + int result = 0; + int i = 0; + switch(cmd) + { + case BOARD_ID_IOCTL_READ_AREA_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_to_user(argp, &area_select, sizeof(struct area_id_name))) + { + printk("%s:fail to copy area_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:BOARD_ID_IOCTL_READ_LANGUAGE_ID:%s_%s\n",__func__,area_select.locale_language,area_select.locale_region); + mutex_unlock(&board_id->operation_mutex); + break; + + case BOARD_ID_IOCTL_READ_OPERATOR_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_to_user(argp, &operator_select, sizeof(struct operator_id_name))) + { + printk("%s:fail to copy operator_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:BOARD_ID_IOCTL_READ_operator_ID:%s_%s\n",__func__,operator_select.operator_name,operator_select.locale_region); + mutex_unlock(&board_id->operation_mutex); + break; + + case BOARD_ID_IOCTL_READ_RESERVE_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_to_user(argp, &reserve_select, sizeof(struct reserve_id_name))) + { + printk("%s:fail to copy reserve_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:BOARD_ID_IOCTL_READ_RESERVE_ID:%s,%s\n",__func__,reserve_select.reserve_name, reserve_select.locale_region); + mutex_unlock(&board_id->operation_mutex); + break; + + case BOARD_ID_IOCTL_READ_STATUS: + mutex_lock(&board_id->operation_mutex); + if(copy_to_user(argp, &board_id->vendor_data[DEVICE_TYPE_STATUS], sizeof(board_id->vendor_data[DEVICE_TYPE_STATUS]))) + { + printk("%s:line=%d:fail to copy vendor_data to user\n",__func__,__LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + mutex_unlock(&board_id->operation_mutex); + DBG_ID("%s:BOARD_ID_IOCTL_READ_STATUS=0x%x\n",__func__,board_id->vendor_data[DEVICE_TYPE_STATUS]); + break; + + case BOARD_ID_IOCTL_READ_VENDOR_DATA: + mutex_lock(&board_id->operation_mutex); + DBG_ID("%s:BOARD_ID_IOCTL_READ_VENDOR_DATA:\n",__func__); + if(copy_to_user(argp, board_id->vendor_data, sizeof(board_id->vendor_data))) + { + printk("%s:line=%d:fail to copy vendor_data to user\n",__func__,__LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + mutex_unlock(&board_id->operation_mutex); + + break; + + } + + mutex_lock(&board_id->operation_mutex); + switch(cmd) + { + + case BOARD_ID_IOCTL_READ_TP_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_TP]; + break; + case BOARD_ID_IOCTL_READ_LCD_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_LCD]; + break; + case BOARD_ID_IOCTL_READ_KEY_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_KEY]; + break; + case BOARD_ID_IOCTL_READ_CODEC_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_CODEC]; + break; + case BOARD_ID_IOCTL_READ_WIFI_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_WIFI]; + break; + case BOARD_ID_IOCTL_READ_BT_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_BT]; + break; + case BOARD_ID_IOCTL_READ_GPS_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_GPS]; + break; + case BOARD_ID_IOCTL_READ_FM_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_FM]; + break; + case BOARD_ID_IOCTL_READ_MODEM_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_MODEM]; + break; + case BOARD_ID_IOCTL_READ_DDR_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_DDR]; + break; + case BOARD_ID_IOCTL_READ_FLASH_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_FLASH]; + break; + case BOARD_ID_IOCTL_READ_HDMI_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_HDMI]; + break; + case BOARD_ID_IOCTL_READ_BATTERY_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_BATTERY]; + break; + case BOARD_ID_IOCTL_READ_CHARGE_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_CHARGE]; + break; + case BOARD_ID_IOCTL_READ_BACKLIGHT_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_BACKLIGHT]; + break; + case BOARD_ID_IOCTL_READ_HEADSET_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_HEADSET]; + break; + case BOARD_ID_IOCTL_READ_MICPHONE_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_MICPHONE]; + break; + case BOARD_ID_IOCTL_READ_SPEAKER_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_SPEAKER]; + break; + case BOARD_ID_IOCTL_READ_VIBRATOR_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_VIBRATOR]; + break; + case BOARD_ID_IOCTL_READ_TV_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_TV]; + break; + case BOARD_ID_IOCTL_READ_ECHIP_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_ECHIP]; + break; + case BOARD_ID_IOCTL_READ_HUB_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_HUB]; + break; + case BOARD_ID_IOCTL_READ_TPAD_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_TPAD]; + break; + case BOARD_ID_IOCTL_READ_PMIC_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_PMIC]; + break; + case BOARD_ID_IOCTL_READ_REGULATOR_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_REGULATOR]; + break; + case BOARD_ID_IOCTL_READ_RTC_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_RTC]; + break; + case BOARD_ID_IOCTL_READ_CAMERA_FRONT_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_CAMERA_FRONT]; + break; + case BOARD_ID_IOCTL_READ_CAMERA_BACK_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_CAMERA_BACK]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_ANGLE_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_ANGLE]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_ACCEL_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_ACCEL]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_COMPASS_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_COMPASS]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_GYRO_ID : + device_selected_temp = board_id->device_selected[DEVICE_TYPE_GYRO]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_LIGHT_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_LIGHT]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_PROXIMITY_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_PROXIMITY]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_TEMPERATURE_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_TEMPERATURE]; + break; + case BOARD_ID_IOCTL_READ_SENSOR_PRESSURE_ID: + device_selected_temp = board_id->device_selected[DEVICE_TYPE_PRESSURE]; + break; + + case BOARD_ID_IOCTL_WRITE_TP_ID: + case BOARD_ID_IOCTL_WRITE_LCD_ID: + case BOARD_ID_IOCTL_WRITE_KEY_ID: + case BOARD_ID_IOCTL_WRITE_CODEC_ID: + case BOARD_ID_IOCTL_WRITE_WIFI_ID: + case BOARD_ID_IOCTL_WRITE_BT_ID: + case BOARD_ID_IOCTL_WRITE_GPS_ID: + case BOARD_ID_IOCTL_WRITE_FM_ID: + case BOARD_ID_IOCTL_WRITE_MODEM_ID: + case BOARD_ID_IOCTL_WRITE_DDR_ID: + case BOARD_ID_IOCTL_WRITE_FLASH_ID: + case BOARD_ID_IOCTL_WRITE_HDMI_ID: + case BOARD_ID_IOCTL_WRITE_BATTERY_ID: + case BOARD_ID_IOCTL_WRITE_CHARGE_ID: + case BOARD_ID_IOCTL_WRITE_BACKLIGHT_ID: + case BOARD_ID_IOCTL_WRITE_HEADSET_ID: + case BOARD_ID_IOCTL_WRITE_MICPHONE_ID: + case BOARD_ID_IOCTL_WRITE_SPEAKER_ID: + case BOARD_ID_IOCTL_WRITE_VIBRATOR_ID: + case BOARD_ID_IOCTL_WRITE_TV_ID: + case BOARD_ID_IOCTL_WRITE_ECHIP_ID: + case BOARD_ID_IOCTL_WRITE_HUB_ID: + case BOARD_ID_IOCTL_WRITE_PMIC_ID: + case BOARD_ID_IOCTL_WRITE_REGULATOR_ID: + case BOARD_ID_IOCTL_WRITE_RTC_ID: + case BOARD_ID_IOCTL_WRITE_CAMERA_FRONT_ID: + case BOARD_ID_IOCTL_WRITE_CAMERA_BACK_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_ANGLE_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_ACCEL_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_COMPASS_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_GYRO_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_LIGHT_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_PROXIMITY_ID: + case BOARD_ID_IOCTL_WRITE_SENSOR_TEMPERATURE_ID: + case BOARD_ID_IOCTL_READ_DEVICE_NAME_BY_ID: + if(copy_from_user(&device_selected_temp, argp, sizeof(struct device_id_name))) + { + printk("%s:line=%d:fail to copy device_id_name from user\n",__func__, __LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:write: type=%d,id=%d,name=%s\n",__func__, (int)device_selected_temp.type, (int)device_selected_temp.id, device_selected_temp.dev_name); + break; + + } + + switch(cmd) + { + case BOARD_ID_IOCTL_READ_TP_ID: + case BOARD_ID_IOCTL_READ_LCD_ID: + case BOARD_ID_IOCTL_READ_KEY_ID: + case BOARD_ID_IOCTL_READ_CODEC_ID: + case BOARD_ID_IOCTL_READ_WIFI_ID: + case BOARD_ID_IOCTL_READ_BT_ID: + case BOARD_ID_IOCTL_READ_GPS_ID: + case BOARD_ID_IOCTL_READ_FM_ID: + case BOARD_ID_IOCTL_READ_MODEM_ID: + case BOARD_ID_IOCTL_READ_DDR_ID: + case BOARD_ID_IOCTL_READ_FLASH_ID: + case BOARD_ID_IOCTL_READ_HDMI_ID: + case BOARD_ID_IOCTL_READ_BATTERY_ID: + case BOARD_ID_IOCTL_READ_CHARGE_ID: + case BOARD_ID_IOCTL_READ_BACKLIGHT_ID: + case BOARD_ID_IOCTL_READ_HEADSET_ID: + case BOARD_ID_IOCTL_READ_MICPHONE_ID: + case BOARD_ID_IOCTL_READ_SPEAKER_ID: + case BOARD_ID_IOCTL_READ_VIBRATOR_ID: + case BOARD_ID_IOCTL_READ_TV_ID: + case BOARD_ID_IOCTL_READ_ECHIP_ID: + case BOARD_ID_IOCTL_READ_HUB_ID: + case BOARD_ID_IOCTL_READ_PMIC_ID: + case BOARD_ID_IOCTL_READ_REGULATOR_ID: + case BOARD_ID_IOCTL_READ_RTC_ID: + case BOARD_ID_IOCTL_READ_CAMERA_FRONT_ID: + case BOARD_ID_IOCTL_READ_CAMERA_BACK_ID: + case BOARD_ID_IOCTL_READ_SENSOR_ANGLE_ID: + case BOARD_ID_IOCTL_READ_SENSOR_ACCEL_ID: + case BOARD_ID_IOCTL_READ_SENSOR_COMPASS_ID: + case BOARD_ID_IOCTL_READ_SENSOR_GYRO_ID : + case BOARD_ID_IOCTL_READ_SENSOR_LIGHT_ID: + case BOARD_ID_IOCTL_READ_SENSOR_PROXIMITY_ID: + case BOARD_ID_IOCTL_READ_SENSOR_TEMPERATURE_ID: + case BOARD_ID_IOCTL_READ_SENSOR_PRESSURE_ID: + if(copy_to_user(argp, &device_selected_temp, sizeof(struct device_id_name))) + { + printk("%s:line=%d:fail to copy device_selected_temp.dev_name=%s to user\n",__func__,__LINE__,device_selected_temp.dev_name); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:read: type=%d,id=%d,name=%s\n",__func__, (int)device_selected_temp.type, (int)device_selected_temp.id, device_selected_temp.dev_name); + break; + + + + case BOARD_ID_IOCTL_WRITE_TP_ID: + board_id->device_selected[DEVICE_TYPE_TP] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_LCD_ID: + board_id->device_selected[DEVICE_TYPE_LCD] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_KEY_ID: + board_id->device_selected[DEVICE_TYPE_KEY] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_CODEC_ID: + board_id->device_selected[DEVICE_TYPE_CODEC] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_WIFI_ID: + board_id->device_selected[DEVICE_TYPE_WIFI] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_BT_ID: + board_id->device_selected[DEVICE_TYPE_BT] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_GPS_ID: + board_id->device_selected[DEVICE_TYPE_GPS] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_FM_ID: + board_id->device_selected[DEVICE_TYPE_FM] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_MODEM_ID: + board_id->device_selected[DEVICE_TYPE_MODEM] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_DDR_ID: + board_id->device_selected[DEVICE_TYPE_DDR] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_FLASH_ID: + board_id->device_selected[DEVICE_TYPE_FLASH] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_HDMI_ID: + board_id->device_selected[DEVICE_TYPE_HDMI] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_BATTERY_ID: + board_id->device_selected[DEVICE_TYPE_BATTERY] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_CHARGE_ID: + board_id->device_selected[DEVICE_TYPE_CHARGE] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_BACKLIGHT_ID: + board_id->device_selected[DEVICE_TYPE_BACKLIGHT] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_HEADSET_ID: + board_id->device_selected[DEVICE_TYPE_HEADSET] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_MICPHONE_ID: + board_id->device_selected[DEVICE_TYPE_MICPHONE] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SPEAKER_ID: + board_id->device_selected[DEVICE_TYPE_SPEAKER] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_VIBRATOR_ID: + board_id->device_selected[DEVICE_TYPE_VIBRATOR] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_TV_ID: + board_id->device_selected[DEVICE_TYPE_TV] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_ECHIP_ID: + board_id->device_selected[DEVICE_TYPE_ECHIP] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_HUB_ID: + board_id->device_selected[DEVICE_TYPE_HUB] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_TPAD_ID: + board_id->device_selected[DEVICE_TYPE_TPAD] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_PMIC_ID: + board_id->device_selected[DEVICE_TYPE_PMIC] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_REGULATOR_ID: + board_id->device_selected[DEVICE_TYPE_REGULATOR] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_RTC_ID: + board_id->device_selected[DEVICE_TYPE_RTC] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_CAMERA_FRONT_ID: + board_id->device_selected[DEVICE_TYPE_CAMERA_FRONT] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_CAMERA_BACK_ID: + board_id->device_selected[DEVICE_TYPE_CAMERA_BACK] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_ANGLE_ID: + board_id->device_selected[DEVICE_TYPE_ANGLE] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_ACCEL_ID: + board_id->device_selected[DEVICE_TYPE_ACCEL] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_COMPASS_ID: + board_id->device_selected[DEVICE_TYPE_COMPASS] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_GYRO_ID: + board_id->device_selected[DEVICE_TYPE_GYRO] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_LIGHT_ID: + board_id->device_selected[DEVICE_TYPE_LIGHT] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_PROXIMITY_ID: + board_id->device_selected[DEVICE_TYPE_PROXIMITY] = device_selected_temp; + break; + case BOARD_ID_IOCTL_WRITE_SENSOR_TEMPERATURE_ID: + board_id->device_selected[DEVICE_TYPE_TEMPERATURE] = device_selected_temp; + break; + + } + + + mutex_unlock(&board_id->operation_mutex); + + switch(cmd) + { + case BOARD_ID_IOCTL_READ_DEVICE_NAME_BY_ID: + mutex_lock(&board_id->operation_mutex); + if(&board_id->device_start_addr[(unsigned)device_selected_temp.type][(unsigned)device_selected_temp.id]) + memcpy(&device_selected_last_temp, &board_id->device_start_addr[(unsigned)device_selected_temp.type][(unsigned)device_selected_temp.id], sizeof(struct device_id_name)); + else + { + printk("%s:fail to find device,type=%d,id=%d\n",__func__, device_selected_temp.type, device_selected_temp.id); + mutex_unlock(&board_id->operation_mutex); + return -1; + } + if(copy_to_user(argp, &device_selected_last_temp, sizeof(struct device_id_name))) + { + printk("%s:line=%d:fail to copy device_selected_last_temp.dev_name=%s to user\n",__func__,__LINE__,device_selected_last_temp.dev_name); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + DBG_ID("%s:read: type=%d,id=%d,name=%s\n",__func__, (int)device_selected_last_temp.type, (int)device_selected_last_temp.id, device_selected_last_temp.dev_name); + + mutex_unlock(&board_id->operation_mutex); + break; + + case BOARD_ID_IOCTL_READ_AREA_NAME_BY_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_from_user(&language_last_select, argp, sizeof(struct area_id_name))) + { + printk("%s:line=%d:fail to copy area_id_name from user\n",__func__, __LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + + if(copy_to_user(argp, &board_id->area_area_id_name[language_last_select.id], sizeof(struct area_id_name))) + { + printk("%s:fail to copy area_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + + mutex_unlock(&board_id->operation_mutex); + + DBG_ID("%s:BOARD_ID_IOCTL_READ_LANGUAGE_NAME_BY_ID:%s_%s\n",__func__,language_last_select.locale_language,language_last_select.locale_region); + break; + + case BOARD_ID_IOCTL_READ_OPERATOR_NAME_BY_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_from_user(&operator_last_select, argp, sizeof(struct operator_id_name))) + { + printk("%s:line=%d:fail to copy operator_id_name from user\n",__func__, __LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + + for(i=OPERATOR_ID_20000_NO_OPERATOR; iarea_operator_id_name[i].id) + { + if(copy_to_user(argp, &board_id->area_operator_id_name[i], sizeof(struct operator_id_name))) + { + printk("%s:fail to copy operator_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + } + } + mutex_unlock(&board_id->operation_mutex); + + DBG_ID("%s:BOARD_ID_IOCTL_READ_OPERATOR_NAME_BY_ID:%s_%s\n",__func__,operator_last_select.operator_name,operator_last_select.locale_region); + break; + + case BOARD_ID_IOCTL_READ_RESERVE_NAME_BY_ID: + mutex_lock(&board_id->operation_mutex); + if(copy_from_user(&reserve_last_select, argp, sizeof(struct reserve_id_name))) + { + printk("%s:line=%d:fail to copy reserve_id_name from user\n",__func__, __LINE__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + + if(copy_to_user(argp, &board_id->area_reserve_id_name[reserve_last_select.id], sizeof(struct reserve_id_name))) + { + printk("%s:fail to copy reserve_id_name to user\n",__func__); + mutex_unlock(&board_id->operation_mutex); + return -EFAULT; + } + + mutex_unlock(&board_id->operation_mutex); + + DBG_ID("%s:BOARD_ID_IOCTL_READ_RESERVE_NAME_BY_ID:%s_%s\n",__func__,reserve_last_select.reserve_name, reserve_last_select.locale_region); + break; + + } + + DBG_ID("%s:cmd=%d\n",__func__,cmd); + return 0; +} + +static int __init board_id_init(void) +{ + int result ; + struct proc_dir_entry *board_id_proc_entry; + + struct board_id_private_data *board_id = g_board_id; + + if(!board_id) + return -1; + + board_id->id_fops.owner = THIS_MODULE; + board_id->id_fops.open = board_id_open; + board_id->id_fops.release = board_id_release; + board_id->id_fops.unlocked_ioctl = board_id_ioctl; + + board_id->id_miscdev.minor = MISC_DYNAMIC_MINOR; + board_id->id_miscdev.name = "board_id_misc"; + board_id->id_miscdev.fops = &board_id->id_fops; + result = misc_register(&board_id->id_miscdev); + if(result < 0) { + printk("%s:misc_register err,ret=%d\n",__func__,result); + return result; + } + + +#if defined(CONFIG_BOARD_ID_AUTO_XML) + board_id_proc_entry = proc_create("driver/board_id_dbg", 0660, NULL, &board_id_proc_fops); +#endif + board_id->board_id_data_filp = NULL; + board_id->board_id_area_filp = NULL; + board_id->board_id_device_filp = NULL; + + printk("%s:\n",__func__); + + return 0; + +} + +static void __exit board_id_exit(void) +{ + struct board_id_private_data *board_id = g_board_id; + + if(!board_id) + return ; + + misc_deregister(&board_id->id_miscdev); + + set_fs(board_id->board_id_data_fs); + filp_close(board_id->board_id_data_filp, NULL); + + set_fs(board_id->board_id_area_fs); + filp_close(board_id->board_id_area_filp, NULL); + + set_fs(board_id->board_id_device_fs); + filp_close(board_id->board_id_device_filp, NULL); +} + +subsys_initcall_sync(board_id_init); +module_exit(board_id_exit); + +MODULE_AUTHOR("ROCKCHIP Corporation:lw@rock-chips.com"); +MODULE_DESCRIPTION("rockchip board id misc interface for vendor"); +MODULE_LICENSE("GPL"); diff --git a/arch/arm/plat-rk/bid/board-id-hw.c b/arch/arm/plat-rk/bid/board-id-hw.c new file mode 100755 index 000000000000..760732b03e77 --- /dev/null +++ b/arch/arm/plat-rk/bid/board-id-hw.c @@ -0,0 +1,163 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#if 0 +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + +extern void kernel_restart(char *cmd); + +struct board_id_hw_private_data { + struct mutex id_mutex; + int last_value[16]; + int board_id; + struct board_id_platform_data *pdata; +}; + +static struct board_id_hw_private_data *g_id; + + +enum board_id_hw get_board_id_hw(void) +{ + struct board_id_hw_private_data *id = g_id; + DBG("%s:id:0x%x\n",__func__,id->board_id); + return id->board_id; +} +EXPORT_SYMBOL(get_board_id_hw); + +static int _get_board_id_hw(struct board_id_hw_private_data *id) +{ + int result = 0; + int value1 = 0, value2 = 0, value3 = 0; + int i = 0, j = 0; + + id->board_id = -1; + + for(i=0; ipdata->num_gpio; i++) + { + gpio_request(id->pdata->gpio_pin[i],"gpio_board_id"); + gpio_direction_input(id->pdata->gpio_pin[i]); + gpio_pull_updown(id->pdata->gpio_pin[i], PullDisable); + for(j=0; j<1000; j++) + { + value1 = gpio_get_value(id->pdata->gpio_pin[i]); + if(value1 < 0) + continue; + mdelay(1); + value2 = gpio_get_value(id->pdata->gpio_pin[i]); + if(value2 < 0) + continue; + mdelay(1); + value3 = gpio_get_value(id->pdata->gpio_pin[i]); + if(value3 < 0) + continue; + if((value1 == value2) && (value2 == value3)) + break; + } + if(j >= 1000) + { + printk("%s:hareware error,gpio level changed always!\n",__func__); + kernel_restart(NULL); + } + + result = (value1 << i) | result; + + DBG("%s:gpio:%d,value:%d\n",__func__,id->pdata->gpio_pin[i],value1); + } + + id->board_id = result; + + + DBG("%s:num=%d,id=0x%x\n",__func__,id->pdata->num_gpio, id->board_id); + + return result; +} + + +static int __devinit board_id_hw_probe(struct platform_device *pdev) +{ + struct board_id_platform_data *pdata = pdev->dev.platform_data; + struct board_id_hw_private_data *id = NULL; + int result = 0; + + if(!pdata) + return -ENOMEM; + + id = kzalloc(sizeof(struct board_id_hw_private_data), GFP_KERNEL); + if (id == NULL) { + dev_err(&pdev->dev, "Unable to allocate private data\n"); + return -ENOMEM; + } + + id->pdata = pdata; + + if(pdata->init_platform_hw) + pdata->init_platform_hw(); + + result = _get_board_id_hw(id); + + if(pdata->init_parameter) + pdata->init_parameter(id->board_id); + + if(pdata->exit_platform_hw) + pdata->exit_platform_hw(); + + platform_set_drvdata(pdev, id); + g_id = id; + + printk("%s:board id :0x%x\n",__func__,result); + return 0; +} + +static int __devexit board_id_hw_remove(struct platform_device *pdev) +{ + //struct board_id_platform_data *pdata = pdev->dev.platform_data; + struct board_id_hw_private_data *id = platform_get_drvdata(pdev); + + kfree(id); + + return 0; +} + +static struct platform_driver board_id_hw_driver = { + .probe = board_id_hw_probe, + .remove = __devexit_p(board_id_hw_remove), + .driver = { + .name = "board_id_hw", + .owner = THIS_MODULE, + }, +}; + +static int __init board_id_hw_init(void) +{ + return platform_driver_register(&board_id_hw_driver); +} + +static void __exit board_id_hw_exit(void) +{ + platform_driver_unregister(&board_id_hw_driver); +} + +arch_initcall_sync(board_id_hw_init); +module_exit(board_id_hw_exit); + +MODULE_AUTHOR("ROCKCHIP Corporation:lw@rock-chips.com"); +MODULE_DESCRIPTION("Interface for get board id"); +MODULE_LICENSE("GPL"); + + diff --git a/arch/arm/plat-rk/bid/board-id.c b/arch/arm/plat-rk/bid/board-id.c new file mode 100755 index 000000000000..17f5cc88618e --- /dev/null +++ b/arch/arm/plat-rk/bid/board-id.c @@ -0,0 +1,1184 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +struct board_id_private_data *g_board_id; + +extern char GetSNSectorInfoBeforeNandInit(char * pbuf); +extern char GetVendor0InfoBeforeNandInit(char * pbuf); + +static struct device_id_name tp_id_name[TP_ID_NUMS] = { + {DEVICE_TYPE_TP, TP_ID_NULL, "tp", "no_tp", "no", "no_tp", ((DEVICE_TYPE_TP<<8)+TP_ID_NULL)}, + {DEVICE_TYPE_TP, TP_ID_GT813, "tp", "Goodix-TS", "Goodix-TS", "gt813", ((DEVICE_TYPE_TP<<8)+TP_ID_GT813)}, + {DEVICE_TYPE_TP, TP_ID_EKTF2K, "tp", "elan-ktf2k", "elan-ktf2k", "elan-ktf2k", ((DEVICE_TYPE_TP<<8)+TP_ID_EKTF2K)}, + +}; + + +static struct device_id_name lcd_id_name[LCD_ID_NUMS] = { + {DEVICE_TYPE_LCD, LCD_ID_NULL, "lcd", "no_lcd", "no", "no_lcd", ((DEVICE_TYPE_LCD<<8)+LCD_ID_NULL)}, + {DEVICE_TYPE_LCD, LCD_ID_IVO_M101_NWN8, "lcd", "IVO_M101_NWN8", "IVO_M101_NWN8", "101' 1280*800", ((DEVICE_TYPE_LCD<<8)+LCD_ID_IVO_M101_NWN8)}, + {DEVICE_TYPE_LCD, LCD_ID_EDID_I2C, "lcd", "lcd_edid_i2c", "edid", "auto lcd edid", ((DEVICE_TYPE_LCD<<8)+LCD_ID_EDID_I2C)}, + +}; + + +static struct device_id_name key_id_name[KEY_ID_NUMS] = { + {DEVICE_TYPE_KEY, KEY_ID_NULL, "key", "no_key", "no", "no_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_NULL)}, + {DEVICE_TYPE_KEY, KEY_ID_SHUTTLE, "key", "shuttle_key", "shuttle", "shuttle_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_SHUTTLE)}, + {DEVICE_TYPE_KEY, KEY_ID_BITLAND, "key", "blueberry_kb", "bitland", "bitland_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_BITLAND)}, + {DEVICE_TYPE_KEY, KEY_ID_MALATA, "key", "malata_key", "malata", "malata_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_MALATA)}, + {DEVICE_TYPE_KEY, KEY_ID_CAPSENSE, "key", "cy8c20236", "cy8c20236", "cy8c20236_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_CAPSENSE)}, + + // type id type_name driver_name dev_name description device_id + {DEVICE_TYPE_KEY, KEY_ID_ENGLISH_US, "key", "blueberry_kb", "english_us", "english_us_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_ENGLISH_US)}, + {DEVICE_TYPE_KEY, KEY_ID_ENGLISH_UK, "key", "blueberry_kb", "english_uk", "english_uk_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_ENGLISH_UK)}, + + {DEVICE_TYPE_KEY, KEY_ID_TURKISH, "key", "blueberry_kb", "turkish", "turkish_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_TURKISH)}, + {DEVICE_TYPE_KEY, KEY_ID_SLOVENIAN, "key", "blueberry_kb", "slovenian", "slovenian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_SLOVENIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_RUSSIAN, "key", "blueberry_kb", "russian", "russian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_RUSSIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_CZECH, "key", "blueberry_kb", "czech", "czech_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_CZECH)}, + {DEVICE_TYPE_KEY, KEY_ID_HUNGARIAN, "key", "blueberry_kb", "hungarian", "hungarian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_HUNGARIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_HINDI, "key", "blueberry_kb", "hindi", "hindi_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_HINDI)}, + {DEVICE_TYPE_KEY, KEY_ID_THAI, "key", "blueberry_kb", "thai", "thai_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_THAI)}, + {DEVICE_TYPE_KEY, KEY_ID_PORTUGUESE, "key", "blueberry_kb", "portuguese", "portuguese_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_PORTUGUESE)}, + {DEVICE_TYPE_KEY, KEY_ID_ARABIC, "key", "blueberry_kb", "arabic", "arabic_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_ARABIC)}, + {DEVICE_TYPE_KEY, KEY_ID_GREEK, "key", "blueberry_kb", "greek", "greek_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_GREEK)}, + //Nordics + {DEVICE_TYPE_KEY, KEY_ID_SWEDISH, "key", "blueberry_kb", "swedish", "swedish_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_SWEDISH)}, + {DEVICE_TYPE_KEY, KEY_ID_NORWEGIAN, "key", "blueberry_kb", "norwegian", "norwegian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_NORWEGIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_FINNISH, "key", "blueberry_kb", "finnish", "finnish_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_FINNISH)}, + {DEVICE_TYPE_KEY, KEY_ID_DANISH, "key", "blueberry_kb", "danish", "danish_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_DANISH)}, + {DEVICE_TYPE_KEY, KEY_ID_ESTONIAN, "key", "blueberry_kb", "estonian", "estonian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_ESTONIAN)}, + + {DEVICE_TYPE_KEY, KEY_ID_FRENCH, "key", "blueberry_kb", "french", "french_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_FRENCH)}, + {DEVICE_TYPE_KEY, KEY_ID_GERMAN, "key", "blueberry_kb", "german", "german_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_GERMAN)}, + {DEVICE_TYPE_KEY, KEY_ID_HEBREW, "key", "blueberry_kb", "hebrew", "hebrew_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_HEBREW)}, + {DEVICE_TYPE_KEY, KEY_ID_ITALIAN, "key", "blueberry_kb", "italian", "italian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_ITALIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_SPANISH, "key", "blueberry_kb", "spanish", "spanish_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_SPANISH)}, + + {DEVICE_TYPE_KEY, KEY_ID_SWISS, "key", "blueberry_kb", "swiss", "swiss_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_SWISS)}, + {DEVICE_TYPE_KEY, KEY_ID_DUTCH, "key", "blueberry_kb", "dutch", "dutch_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_DUTCH)}, + {DEVICE_TYPE_KEY, KEY_ID_BELGIAN, "key", "blueberry_kb", "belgian", "belgian_key", ((DEVICE_TYPE_KEY<<8)+KEY_ID_BELGIAN)}, + {DEVICE_TYPE_KEY, KEY_ID_NORDIC, "key", "blueberry_kb", "nordic", "nordic_kb", ((DEVICE_TYPE_KEY<<8)+KEY_ID_NORDIC)}, + + +}; + + +static struct device_id_name codec_id_name[CODEC_ID_NUMS] = { + {DEVICE_TYPE_CODEC, CODEC_ID_NULL, "codec", "no_codec", "no", "no_codec", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_NULL)}, + //to add + {DEVICE_TYPE_CODEC, CODEC_ID_WM8994, "codec", "wm8994", "wm8994", "wm8994", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_WM8994)}, + {DEVICE_TYPE_CODEC, CODEC_ID_WM8900, "codec", "wm8900", "wm8900", "wm8900", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_WM8900)}, + {DEVICE_TYPE_CODEC, CODEC_ID_WM8988, "codec", "wm8988", "wm8988", "wm8988", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_WM8988)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5616, "codec", "rt5616", "rt5616", "rt5616", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5616)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5621, "codec", "rt5621", "rt5621", "rt5621", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5621)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5623, "codec", "rt5623", "rt5623", "rt5623", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5623)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT3224, "codec", "rt3224", "rt3224", "rt3224", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT3224)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5625, "codec", "rt5625", "rt5625", "rt5625", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5625)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5631, "codec", "rt5631", "rt5631", "rt5631", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5631)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5639, "codec", "rt5639", "rt5639", "rt5639", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5639)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5640, "codec", "rt5640", "rt5640", "rt5640", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5640)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT5642, "codec", "rt5642", "rt5642", "rt5642", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT5642)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RT3261, "codec", "rt3261", "rt3261", "rt3261", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RT3261)}, + {DEVICE_TYPE_CODEC, CODEC_ID_AIC3262, "codec", "aic3262", "aic3262", "aic3262", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_AIC3262)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RK610, "codec", "rk610_i2c_codec", "rk610", "rk610", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RK610)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RK616, "codec", "rk616", "rk616", "rk616", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RK616)}, + {DEVICE_TYPE_CODEC, CODEC_ID_RK1000, "codec", "rk1000", "rk1000", "rk1000", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_RK1000)}, + {DEVICE_TYPE_CODEC, CODEC_ID_CS42L52, "codec", "cs42l52", "cs42l52", "cs42l52", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_CS42L52)}, + {DEVICE_TYPE_CODEC, CODEC_ID_ES8323, "codec", "es8323", "es8323", "es8323", ((DEVICE_TYPE_CODEC<<8)+CODEC_ID_ES8323)}, + +}; + + +static struct device_id_name wifi_id_name[WIFI_ID_NUMS] = { + {DEVICE_TYPE_WIFI, WIFI_ID_NULL, "wifi", "no_wifi", "no", "no_wifi", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_NULL)}, + {DEVICE_TYPE_WIFI, WIFI_ID_BCM, "wifi", "bcmdhd_wlan", "bcm", "WIFI_MODULE_BCM product", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_BCM)}, + {DEVICE_TYPE_WIFI, WIFI_ID_BCM4319, "wifi", "bcmdhd_wlan", "bcm4319", "WIFI_MODULE_BCM4319", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_BCM4319)}, + {DEVICE_TYPE_WIFI, WIFI_ID_BCM4330, "wifi", "bcmdhd_wlan", "bcm4330", "WIFI_MODULE_BCM4330", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_BCM4330)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RK903_26M, "wifi", "bcmdhd_wlan", "rk903_26m", "WIFI_MODULE_RK903_26M", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RK903_26M)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RK903_37M, "wifi", "bcmdhd_wlan", "rk903_37m", "WIFI_MODULE_RK903_37M", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RK903_37M)}, + {DEVICE_TYPE_WIFI, WIFI_ID_BCM4329, "wifi", "bcmdhd_wlan", "bcm4329", "WIFI_MODULE_BCM4329", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_BCM4329)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RK901, "wifi", "bcmdhd_wlan", "rk901", "WIFI_MODULE_RK901", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RK901)}, + {DEVICE_TYPE_WIFI, WIFI_ID_AP6181, "wifi", "ap6181", "ap6181", "WIFI_MODULE_AP6181", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_AP6181)}, + {DEVICE_TYPE_WIFI, WIFI_ID_AP6210, "wifi", "ap6210", "ap6210", "WIFI_MODULE_AP6210", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_AP6210)}, + {DEVICE_TYPE_WIFI, WIFI_ID_AP6330, "wifi", "ap6330", "ap6330", "WIFI_MODULE_AP6330", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_AP6330)}, + {DEVICE_TYPE_WIFI, WIFI_ID_AP6476, "wifi", "ap6476", "ap6476", "WIFI_MODULE_AP6476", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_AP6476)}, + {DEVICE_TYPE_WIFI, WIFI_ID_AP6493, "wifi", "ap6493", "ap6493", "WIFI_MODULE_AP6493", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_AP6493)}, + {DEVICE_TYPE_WIFI, WIFI_ID_GB86302I, "wifi", "gb86302i", "gb86302i", "WIFI_MODULE_GB86302I", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_GB86302I)}, + + {DEVICE_TYPE_WIFI, WIFI_ID_RTL8192CU, "wifi", "rtl8192cu_usb", "rtl8192cu_usb", "WIFI_MODULE_RTL8192CU_USB", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RTL8192CU)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RTL8188EU, "wifi", "rt8188eu_usb", "rt8188eu_usb", "WIFI_MODULE_RTL8188EU_USB", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RTL8188EU)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RTL8723AU, "wifi", "rtl8723au_usb", "rtl8723au_usb", "WIFI_MODULE_RTL8723AU_USB", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RTL8723AU)}, + + + {DEVICE_TYPE_WIFI, WIFI_ID_COMBO, "wifi", "combo-wifi", "combo-wifi", "WIFI_MODULE_MT product", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_COMBO)}, + {DEVICE_TYPE_WIFI, WIFI_ID_MT5931, "wifi", "combo-wifi", "mt5931", "WIFI_MODULE_MT5931", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_MT5931)}, + {DEVICE_TYPE_WIFI, WIFI_ID_RT5370, "wifi", "rt5370_usb", "rt5370", "WIFI_MODULE_RT5370_USB", ((DEVICE_TYPE_WIFI<<8)+WIFI_ID_RT5370)}, + +}; + + +static struct device_id_name bt_id_name[BT_ID_NUMS] = { + {DEVICE_TYPE_BT, BT_ID_NULL, "bt", "no_bluetooth", "no", "no_bluetooth", ((DEVICE_TYPE_BT<<8)+BT_ID_NULL)}, + {DEVICE_TYPE_BT, BT_ID_NH660, "bt", "nh660", "nh660", "BT_MODULE_NH660", ((DEVICE_TYPE_BT<<8)+BT_ID_NH660)}, + {DEVICE_TYPE_BT, BT_ID_BCM4330, "bt", "rfkill_rk", "bcm4330", "BT_MODULE_BCM4330", ((DEVICE_TYPE_BT<<8)+BT_ID_BCM4330)}, + {DEVICE_TYPE_BT, BT_ID_RK903_26M, "bt", "rfkill_rk", "rk903_26m", "BT_MODULE_RK903_26M", ((DEVICE_TYPE_BT<<8)+BT_ID_RK903_26M)}, + {DEVICE_TYPE_BT, BT_ID_RK903, "bt", "rfkill_rk", "rk903", "BT_MODULE_RK903_37M", ((DEVICE_TYPE_BT<<8)+BT_ID_RK903)}, + {DEVICE_TYPE_BT, BT_ID_BCM4329, "bt", "rfkill_rk", "bcm4329", "BT_MODULE_BCM4329", ((DEVICE_TYPE_BT<<8)+BT_ID_BCM4329)}, + {DEVICE_TYPE_BT, BT_ID_MV8787, "bt", "rfkill_rk", "mv8787", "BT_MODULE_MV8787", ((DEVICE_TYPE_BT<<8)+BT_ID_MV8787)}, + {DEVICE_TYPE_BT, BT_ID_AP6210, "bt", "rfkill_rk", "ap6210", "BT_MODULE_AP6210", ((DEVICE_TYPE_BT<<8)+BT_ID_AP6210)}, + {DEVICE_TYPE_BT, BT_ID_AP6330, "bt", "rfkill_rk", "ap6330", "BT_MODULE_AP6330", ((DEVICE_TYPE_BT<<8)+BT_ID_AP6330)}, + {DEVICE_TYPE_BT, BT_ID_AP6476, "bt", "rfkill_rk", "ap6476", "BT_MODULE_AP6476", ((DEVICE_TYPE_BT<<8)+BT_ID_AP6476)}, + {DEVICE_TYPE_BT, BT_ID_AP6493, "bt", "rfkill_rk", "ap6493", "BT_MODULE_AP6493", ((DEVICE_TYPE_BT<<8)+BT_ID_AP6493)}, + {DEVICE_TYPE_BT, BT_ID_RFKILL, "bt", "rfkill_rk", "bcm", "bcm product", ((DEVICE_TYPE_BT<<8)+BT_ID_RFKILL)}, + {DEVICE_TYPE_BT, BT_ID_RTL8723, "bt", "rfkill_rk", "rtl8723", "BT_MODULE_RTL8723", ((DEVICE_TYPE_BT<<8)+BT_ID_RTL8723)}, + {DEVICE_TYPE_BT, BT_ID_MT6622, "bt", "mt6622", "mt6622", "BT_MODULE_MT6622", ((DEVICE_TYPE_BT<<8)+BT_ID_MT6622)}, + +}; + +static struct device_id_name gps_id_name[GPS_ID_NUMS] = { + {DEVICE_TYPE_GPS, GPS_ID_NULL, "gps", "no_gps", "no", "no_gps", ((DEVICE_TYPE_GPS<<8)+GPS_ID_NULL)}, + + //to add + {DEVICE_TYPE_GPS, GPS_ID_RK_HV5820, "gps", "gps_hv5820b", "hv5820b", "gps rk2928", ((DEVICE_TYPE_GPS<<8)+GPS_ID_RK_HV5820)}, + {DEVICE_TYPE_GPS, GPS_ID_BCM4751, "gps", "bcm4751", "bcm4751", "gps bcm4751", ((DEVICE_TYPE_GPS<<8)+GPS_ID_BCM4751)}, + {DEVICE_TYPE_GPS, GPS_ID_GNS7560, "gps", "gns7560", "gns7560", "gps gns7560", ((DEVICE_TYPE_GPS<<8)+GPS_ID_GNS7560)}, + {DEVICE_TYPE_GPS, GPS_ID_MT3326, "gps", "mt3326", "mt3326", "gps mt3326", ((DEVICE_TYPE_GPS<<8)+GPS_ID_MT3326)}, + +}; + +static struct device_id_name fm_id_name[FM_ID_NUMS] = { + {DEVICE_TYPE_FM, FM_ID_NULL, "fm", "no_fm", "no", "no_fm", ((DEVICE_TYPE_FM<<8)+FM_ID_NULL)}, + + //to add +}; + + +static struct device_id_name modem_id_name[MODEM_ID_NUMS] = { + {DEVICE_TYPE_MODEM, MODEM_ID_NULL, "modem", "no_modem", "no", "no_modem", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_NULL)}, + + //to add + {DEVICE_TYPE_MODEM, MODEM_ID_MT6229, "modem", "bp-auto", "mt6229", "USI MT6229 WCDMA", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_MT6229)}, + {DEVICE_TYPE_MODEM, MODEM_ID_MU509, "modem", "bp-auto", "mu509", "huawei MU509 WCDMA", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_MU509)}, + {DEVICE_TYPE_MODEM, MODEM_ID_MI700, "modem", "bp-auto", "mi700", "thinkwill MI700 WCDMA", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_MI700)}, + {DEVICE_TYPE_MODEM, MODEM_ID_MW100, "modem", "bp-auto", "mw100", "thinkwill MW100 WCDMA", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_MW100)}, + {DEVICE_TYPE_MODEM, MODEM_ID_TD8801, "modem", "bp-auto", "td8801", "spreadtrum SC8803 TD-SCDMA", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_TD8801)}, + {DEVICE_TYPE_MODEM, MODEM_ID_SC6610, "modem", "bp-auto", "sc6610", "spreadtrum SC6610 GSM", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_SC6610)}, + {DEVICE_TYPE_MODEM, MODEM_ID_M50, "modem", "bp-auto", "m50", "spreadtrum RDA GSM", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_M50)}, + {DEVICE_TYPE_MODEM, MODEM_ID_MT6250, "modem", "bp-auto", "mt6250", "ZINN M50 EDGE", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_MT6250)}, + {DEVICE_TYPE_MODEM, MODEM_ID_C66A, "modem", "bp-auto", "c66a", "zhongben w200 gsm", ((DEVICE_TYPE_MODEM<<8)+MODEM_ID_C66A)}, + +}; + +static struct device_id_name ddr_id_name[DDR_ID_NUMS] = { + {DEVICE_TYPE_DDR, DDR_ID_NULL, "ddr", "no_ddr", "no", "no_ddr", ((DEVICE_TYPE_DDR<<8)+DDR_ID_NULL)}, + + //to add +}; + +static struct device_id_name flash_id_name[FLASH_ID_NUMS] = { + {DEVICE_TYPE_FLASH, FLASH_ID_NULL, "flash", "no_flash", "no", "no_flash", ((DEVICE_TYPE_FLASH<<8)+FLASH_ID_NULL)}, + + //to add +}; + + +static struct device_id_name hdmi_id_name[HDMI_ID_NUMS] = { + {DEVICE_TYPE_HDMI, HDMI_ID_NULL, "hdmi", "no_hdmi", "no", "no_hdmi", ((DEVICE_TYPE_HDMI<<8)+HDMI_ID_NULL)}, + + //to add + {DEVICE_TYPE_HDMI, HDMI_ID_RK30, "hdmi", "rk_hdmi", "rk", "rk3066 hdmi", ((DEVICE_TYPE_HDMI<<8)+HDMI_ID_RK30)}, + {DEVICE_TYPE_HDMI, HDMI_ID_CAT66121, "hdmi", "cat66121_hdmi", "cat66121", "hdmi cat66121", ((DEVICE_TYPE_HDMI<<8)+HDMI_ID_CAT66121)}, + {DEVICE_TYPE_HDMI, HDMI_ID_RK610, "hdmi", "rk610_hdmi", "rk610", "hdmi rk610", ((DEVICE_TYPE_HDMI<<8)+HDMI_ID_RK610)}, + +}; + + +static struct device_id_name battery_id_name[BATTERY_ID_NUMS] = { + {DEVICE_TYPE_BATTERY, BATTERY_ID_NULL, "battery", "no_battery", "no", "no_battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_NULL)}, + + //to add + {DEVICE_TYPE_BATTERY, BATTERY_ID_3300MAH, "battery", "rk30-battery", "3300mah", "3300mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_3300MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_3600MAH, "battery", "rk30-battery", "3600mah", "3600mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_3600MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_4700MAH, "battery", "rk30-battery", "4700mah", "4700mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_4700MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_7000MAH, "battery", "rk30-battery", "7000mah", "7000mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_7000MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_7700MAH, "battery", "rk30-battery", "7700mah", "7700mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_7700MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_9000MAH, "battery", "rk30-battery", "9000mah", "9000mah battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_9000MAH)}, + {DEVICE_TYPE_BATTERY, BATTERY_ID_BLUEBERRY, "battery", "blueberry_bat", "blueberry", "blueberry battery", ((DEVICE_TYPE_BATTERY<<8)+BATTERY_ID_BLUEBERRY)}, + +}; + + + +static struct device_id_name charge_id_name[CHARGE_ID_NUMS] = { + {DEVICE_TYPE_CHARGE, CHARGE_ID_NULL, "charge", "no_charge", "no", "no_charge", ((DEVICE_TYPE_CHARGE<<8)+CHARGE_ID_NULL)}, + + //to add + {DEVICE_TYPE_CHARGE, CHARGE_ID_CW2015, "charge", "cw2015", "cw2015", "charge cw2015", ((DEVICE_TYPE_CHARGE<<8)+CHARGE_ID_CW2015)}, + {DEVICE_TYPE_CHARGE, CHARGE_ID_BQ24193, "charge", "bq24193", "bq24193", "charge BQ24193", ((DEVICE_TYPE_CHARGE<<8)+CHARGE_ID_BQ24193)}, + {DEVICE_TYPE_CHARGE, CHARGE_ID_BQ27541, "charge", "bq27541", "bq27541", "charge BQ27541", ((DEVICE_TYPE_CHARGE<<8)+CHARGE_ID_BQ27541)}, + {DEVICE_TYPE_CHARGE, CHARGE_ID_OZ8806, "charge", "oz8806", "oz8806", "charge OZ8806", ((DEVICE_TYPE_CHARGE<<8)+CHARGE_ID_OZ8806)}, + +}; + + +static struct device_id_name backlight_id_name[BACKLIGHT_ID_NUMS] = { + {DEVICE_TYPE_BACKLIGHT, BACKLIGHT_ID_NULL, "backlight", "no_backlight", "no", "no_backlight", ((DEVICE_TYPE_BACKLIGHT<<8)+BACKLIGHT_ID_NULL)}, + + //to add + {DEVICE_TYPE_BACKLIGHT, BACKLIGHT_ID_RK29, "backlight", "rk29_backlight", "rk29_backlight", "rk29_backlight", ((DEVICE_TYPE_BACKLIGHT<<8)+BACKLIGHT_ID_RK29)}, + {DEVICE_TYPE_BACKLIGHT, BACKLIGHT_ID_WM831X, "backlight", "wm831x", "wm831x", "wm831x_backlight", ((DEVICE_TYPE_BACKLIGHT<<8)+BACKLIGHT_ID_WM831X)}, + +}; + +static struct device_id_name headset_id_name[HEADSET_ID_NUMS] = { + {DEVICE_TYPE_HEADSET, HEADSET_ID_NULL, "headset", "no_headset", "no", "no_headset", ((DEVICE_TYPE_HEADSET<<8)+HEADSET_ID_NULL)}, + + //to add + {DEVICE_TYPE_HEADSET, HEADSET_ID_RK29, "headset", "rk_headsetdet", "rk_headsetdet", "rk29 headset", ((DEVICE_TYPE_HEADSET<<8)+HEADSET_ID_RK29)}, + +}; + + + +static struct device_id_name micphone_id_name[MICPHONE_ID_NUMS] = { + {DEVICE_TYPE_MICPHONE, MICPHONE_ID_NULL, "micphone", "no_micphone", "no", "no_micphone", ((DEVICE_TYPE_MICPHONE<<8)+MICPHONE_ID_NULL)}, + + //to add + {DEVICE_TYPE_MICPHONE, MICPHONE_ID_ANALOGIC, "micphone", "analogic", "analogic", "micphone analogic", ((DEVICE_TYPE_MICPHONE<<8)+MICPHONE_ID_ANALOGIC)}, + {DEVICE_TYPE_MICPHONE, MICPHONE_ID_DIGITAL, "micphone", "digital", "digital", "micphone digital", ((DEVICE_TYPE_MICPHONE<<8)+MICPHONE_ID_DIGITAL)}, +}; + + +static struct device_id_name speaker_id_name[SPEAKER_ID_NUMS] = { + {DEVICE_TYPE_SPEAKER, SPEAKER_ID_NULL, "speaker", "no_speaker", "no", "no_speaker", ((DEVICE_TYPE_SPEAKER<<8)+SPEAKER_ID_NULL)}, + + //to add + {DEVICE_TYPE_SPEAKER, SPEAKER_ID_0W8, "speaker", "speaker_08w", "speaker_08w", "speaker 0.8W", ((DEVICE_TYPE_SPEAKER<<8)+SPEAKER_ID_0W8)}, + {DEVICE_TYPE_SPEAKER, SPEAKER_ID_1W0, "speaker", "speaker_10w", "speaker_10w", "speaker 1.0W", ((DEVICE_TYPE_SPEAKER<<8)+SPEAKER_ID_1W0)}, + {DEVICE_TYPE_SPEAKER, SPEAKER_ID_1W5, "speaker", "speaker_15w", "speaker_15w", "speaker 1.5W", ((DEVICE_TYPE_SPEAKER<<8)+SPEAKER_ID_1W5)}, + +}; + +static struct device_id_name vibrator_id_name[VIBRATOR_ID_NUMS] = { + {DEVICE_TYPE_VIBRATOR, VIBRATOR_ID_NULL, "vibrator", "no_vibrator", "no", "no_vibrator", ((DEVICE_TYPE_VIBRATOR<<8)+VIBRATOR_ID_NULL)}, + + //to add + {DEVICE_TYPE_VIBRATOR, VIBRATOR_ID_RK29, "vibrator", "timed-gpio", "timed-gpio", "vibrator gpio", ((DEVICE_TYPE_VIBRATOR<<8)+VIBRATOR_ID_RK29)}, +}; + +static struct device_id_name tv_id_name[TV_ID_NUMS] = { + {DEVICE_TYPE_TV, TV_ID_NULL, "tv", "no_tv", "no", "no_tv", ((DEVICE_TYPE_TV<<8)+TV_ID_NULL)}, + + //to add + {DEVICE_TYPE_TV, TV_ID_RK610, "tv", "rk610_tvout", "rk610_tvout", "tv rk610", ((DEVICE_TYPE_TV<<8)+TV_ID_RK610)}, +}; + + +static struct device_id_name echip_id_name[ECHIP_ID_NUMS] = { + {DEVICE_TYPE_ECHIP, ECHIP_ID_NULL, "echip", "no_ec", "no", "no_ec", ((DEVICE_TYPE_ECHIP<<8)+ECHIP_ID_NULL)}, + + //to add + {DEVICE_TYPE_ECHIP, ECHIP_ID_IT8561, "echip", "ec_dev_i2c", "ec_dev_i2c", "ec it8561", ((DEVICE_TYPE_ECHIP<<8)+ECHIP_ID_IT8561)}, + {DEVICE_TYPE_ECHIP, ECHIP_ID_ITE, "echip", "ite", "ite", "ec ite", ((DEVICE_TYPE_ECHIP<<8)+ECHIP_ID_ITE)}, +}; + + +static struct device_id_name hub_id_name[HUB_ID_NUMS] = { + {DEVICE_TYPE_HUB, HUB_ID_NULL, "hub", "no_hub", "no", "no_hub", ((DEVICE_TYPE_HUB<<8)+HUB_ID_NULL)}, + + //to add + {DEVICE_TYPE_HUB, HUB_ID_USB4604, "hub", "usb4604", "usb4604", "3 ports", ((DEVICE_TYPE_HUB<<8)+HUB_ID_USB4604)}, +}; + +static struct device_id_name tpad_id_name[TPAD_ID_NUMS] = { + {DEVICE_TYPE_TPAD, TPAD_ID_NULL, "tpad", "no_tpad", "no", "no_tpad", ((DEVICE_TYPE_TPAD<<8)+TPAD_ID_NULL)}, + + //to add + {DEVICE_TYPE_TPAD, TPAD_ID_ELAN, "tpad", "blueberry_tp", "elan", "elan", ((DEVICE_TYPE_TPAD<<8)+TPAD_ID_ELAN)}, + {DEVICE_TYPE_TPAD, TPAD_ID_SYNS, "tpad", "a10_tp_syn", "syns", "syns", ((DEVICE_TYPE_TPAD<<8)+TPAD_ID_SYNS)}, +}; + + + +static struct device_id_name pmic_id_name[PMIC_ID_NUMS] = { + {DEVICE_TYPE_PMIC, PMIC_ID_NULL, "pmic", "no_pmic", "no", "no_pmic", ((DEVICE_TYPE_PMIC<<8)+PMIC_ID_NULL)}, + + //to add + {DEVICE_TYPE_PMIC, PMIC_ID_WM831X, "pmic", "wm831x", "wm831x", "wm831x", ((DEVICE_TYPE_PMIC<<8)+PMIC_ID_WM831X)}, + {DEVICE_TYPE_PMIC, PMIC_ID_WM8326, "pmic", "wm8326", "wm8326", "wm8326", ((DEVICE_TYPE_PMIC<<8)+PMIC_ID_WM8326)}, + {DEVICE_TYPE_PMIC, PMIC_ID_TPS65910, "pmic", "tps65910", "tps65910", "tps65910", ((DEVICE_TYPE_PMIC<<8)+PMIC_ID_TPS65910)}, + {DEVICE_TYPE_PMIC, PMIC_ID_ACT8846, "pmic", "act8846", "act8846", "act8846", ((DEVICE_TYPE_PMIC<<8)+PMIC_ID_ACT8846)}, + +}; + +static struct device_id_name regulator_id_name[REGULATOR_ID_NUMS] = { + {DEVICE_TYPE_REGULATOR, REGULATOR_ID_NULL, "regulator", "no_regulator", "no", "no_regulator", ((DEVICE_TYPE_REGULATOR<<8)+REGULATOR_ID_NULL)}, + + //to add + {DEVICE_TYPE_REGULATOR, REGULATOR_ID_PWM3, "regulator", "pwm3", "pwm3", "regulator pwm3", ((DEVICE_TYPE_REGULATOR<<8)+REGULATOR_ID_PWM3)}, + +}; + + +static struct device_id_name rtc_id_name[RTC_ID_NUMS] = { + {DEVICE_TYPE_RTC, RTC_ID_NULL, "rtc", "no_rtc", "no", "no_rtc", ((DEVICE_TYPE_RTC<<8)+RTC_ID_NULL)}, + + //to add + {DEVICE_TYPE_RTC, RTC_ID_HYM8563, "rtc", "rtc_hym8563", "hym8563", "hym8563", ((DEVICE_TYPE_RTC<<8)+RTC_ID_HYM8563)}, + {DEVICE_TYPE_RTC, RTC_ID_PCF8563, "rtc", "rtc-pcf8563", "pcf8563", "pcf8563", ((DEVICE_TYPE_RTC<<8)+RTC_ID_PCF8563)}, + {DEVICE_TYPE_RTC, RTC_ID_TPS65910, "rtc", "rtc_tps65910", "tps65910", "tps65910", ((DEVICE_TYPE_RTC<<8)+RTC_ID_TPS65910)}, + {DEVICE_TYPE_RTC, RTC_ID_WM8326, "rtc", "rtc_wm8326", "wm8326", "wm8326", ((DEVICE_TYPE_RTC<<8)+RTC_ID_WM8326)}, + {DEVICE_TYPE_RTC, RTC_ID_RK, "rtc", "rk_rtc", "rk", "rk_rtc", ((DEVICE_TYPE_RTC<<8)+RTC_ID_RK)}, + +}; + +static struct device_id_name camera_front_id_name[CAMERA_FRONT_ID_NUMS] = { + {DEVICE_TYPE_CAMERA_FRONT, CAMERA_FRONT_ID_NULL, "camera_front", "no_front", "no", "no_camera_front", ((DEVICE_TYPE_CAMERA_FRONT<<8) + ++CAMERA_FRONT_ID_NULL)}, + + //to add + +}; + +static struct device_id_name camera_back_id_name[CAMERA_BACK_ID_NUMS] = { + {DEVICE_TYPE_CAMERA_BACK, CAMERA_BACK_ID_NULL, "camera_back", "no_back", "no", "no_camera_back", ((DEVICE_TYPE_CAMERA_BACK<<8)+CAMERA_BACK_ID_NULL)}, + + //to add +}; + +static struct device_id_name sensor_angle_id_name[ANGLE_ID_NUMS] = { + {DEVICE_TYPE_ANGLE, ANGLE_ID_NULL, "angle", "no_angle", "no", "no_angle_sensor", ((DEVICE_TYPE_ANGLE<<8)+ANGLE_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_accel_id_name[ACCEL_ID_NUMS] = { + {DEVICE_TYPE_ACCEL, ACCEL_ID_NULL, "accel", "no_accel", "no", "no_accel_sensor", ((DEVICE_TYPE_ACCEL<<8)+ACCEL_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_compass_id_name[COMPASS_ID_NUMS] = { + {DEVICE_TYPE_COMPASS, COMPASS_ID_NULL, "compass", "no_compass", "no", "no_compass_sensor", ((DEVICE_TYPE_COMPASS<<8)+COMPASS_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_gyroscope_id_name[GYRO_ID_NUMS] = { + {DEVICE_TYPE_GYRO, GYRO_ID_NULL, "gyro", "no_gyro", "no", "no_gyro_sensor", ((DEVICE_TYPE_GYRO<<8)+GYRO_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_light_id_name[LIGHT_ID_NUMS] = { + {DEVICE_TYPE_LIGHT, LIGHT_ID_NULL, "light", "no_light", "no", "no_light_sensor", ((DEVICE_TYPE_LIGHT<<8)+LIGHT_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_proximity_id_name[PROXIMITY_ID_NUMS] = { + {DEVICE_TYPE_PROXIMITY, PROXIMITY_ID_NULL, "proximity", "no_proximity", "no", "no_proximity_sensor", ((DEVICE_TYPE_PROXIMITY<<8)+PROXIMITY_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_temperature_id_name[TEMPERATURE_ID_NUMS] = { + {DEVICE_TYPE_TEMPERATURE, TEMPERATURE_ID_NULL, "temperature", "no_temp", "no", "no_temperature_sensor", ((DEVICE_TYPE_TEMPERATURE<<8) + ++TEMPERATURE_ID_NULL)}, + + //to add + +}; + +static struct device_id_name sensor_pressure_id_name[PRESSURE_ID_NUMS] = { + {DEVICE_TYPE_PRESSURE, PRESSURE_ID_NULL, "pressure", "no_pressure", "no", "no_pressure_sensor", ((DEVICE_TYPE_PRESSURE<<8)+PRESSURE_ID_NULL)}, + + //to add + +}; + +static struct area_id_name area_area_id_name[AREA_ID_NUMS] = { + {DEVICE_TYPE_AREA, AREA_ID_NULL, "no", "no", "no", "no", "no", USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ALBANIA,"Albania",LOCALE_LANGUAGE_EL,LOCALE_REGION_AL,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ALGERIA,"Algeria",LOCALE_LANGUAGE_AR,LOCALE_REGION_DZ,COUNTRY_GEO_NULL,TIME_ZONE_WINDHOEK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ANGOLA,"Angola",LOCALE_LANGUAGE_PT,LOCALE_REGION_AO,COUNTRY_GEO_NULL,TIME_ZONE_WINDHOEK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ARGENTINA,"Argentina",LOCALE_LANGUAGE_ES,LOCALE_REGION_AR,COUNTRY_GEO_NULL,TIME_ZONE_BUENOS_AIRES,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_AUSTRALIA,"Australia",LOCALE_LANGUAGE_EN,LOCALE_REGION_AU,COUNTRY_GEO_NULL,TIME_ZONE_PERTH,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_AUSTRIA,"Austria",LOCALE_LANGUAGE_DE,LOCALE_REGION_AT,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_AZERBAIJAN,"Azerbaijan",LOCALE_LANGUAGE_RU,LOCALE_REGION_AZ,COUNTRY_GEO_NULL,TIME_ZONE_BAKU,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BAHRAIN,"Bahrain",LOCALE_LANGUAGE_AR,LOCALE_REGION_BH,COUNTRY_GEO_NULL,TIME_ZONE_KUWAIT,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BANGLADESH,"Bangladesh",LOCALE_LANGUAGE_EN,LOCALE_REGION_BD,COUNTRY_GEO_NULL,TIME_ZONE_ASTANA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BARBADOS,"Barbados",LOCALE_LANGUAGE_EN,LOCALE_REGION_BB,COUNTRY_GEO_NULL,TIME_ZONE_ATLANTIC_TIME_BARBADOS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BELARUS,"Belarus",LOCALE_LANGUAGE_BE,LOCALE_REGION_BY,COUNTRY_GEO_NULL,TIME_ZONE_MINSK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BELGIUM,"Belgium",LOCALE_LANGUAGE_FR,LOCALE_REGION_BE,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BOLIVIA,"Bolivia",LOCALE_LANGUAGE_ES,LOCALE_REGION_BO,COUNTRY_GEO_NULL,TIME_ZONE_SANTIAGO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BOSNIA_AND_HERZEGOVINA,"Bosnia and Herzegovina",LOCALE_LANGUAGE_SR,LOCALE_REGION_BA,COUNTRY_GEO_NULL,TIME_ZONE_SARAJEVO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BOTSWANA,"Botswana",LOCALE_LANGUAGE_EN,LOCALE_REGION_BW,COUNTRY_GEO_NULL,TIME_ZONE_HARARE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BRAZIL,"Brazil",LOCALE_LANGUAGE_PT,LOCALE_REGION_BR,COUNTRY_GEO_NULL,TIME_ZONE_BRASILIA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BULGARIA,"Bulgaria",LOCALE_LANGUAGE_BG,LOCALE_REGION_BG,COUNTRY_GEO_NULL,TIME_ZONE_ATHENS_ISTANBUL,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CANADA,"Canada",LOCALE_LANGUAGE_EN,LOCALE_REGION_CA,COUNTRY_GEO_NULL,TIME_ZONE_NEWFOUNDLAND,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CHILE,"Chile",LOCALE_LANGUAGE_ES,LOCALE_REGION_CL,COUNTRY_GEO_NULL,TIME_ZONE_SANTIAGO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CHINA,"China",LOCALE_LANGUAGE_ZH,LOCALE_REGION_CN,COUNTRY_GEO_NULL,TIME_ZONE_BEIJING,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_COLOMBIA,"Colombia",LOCALE_LANGUAGE_ES,LOCALE_REGION_CO,COUNTRY_GEO_NULL,TIME_ZONE_BOGOTA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_COTE_D_IVOIRE,"Cote d'Ivoire",LOCALE_LANGUAGE_FR,LOCALE_REGION_CI,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CROATIA,"Croatia",LOCALE_LANGUAGE_HR,LOCALE_REGION_HR,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CYPRUS,"Cyprus",LOCALE_LANGUAGE_EN,LOCALE_REGION_CY,COUNTRY_GEO_NULL,TIME_ZONE_BEIRUT_LEBANON,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CZECH_REPUBLIC,"Czech Republic",LOCALE_LANGUAGE_CS,LOCALE_REGION_CZ,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_DENMARK,"Denmark",LOCALE_LANGUAGE_DA,LOCALE_REGION_DK,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ECUADOR,"Ecuador",LOCALE_LANGUAGE_ES,LOCALE_REGION_EC,COUNTRY_GEO_NULL,TIME_ZONE_MEXICO_CITY,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_EGYPT,"Egypt",LOCALE_LANGUAGE_AR,LOCALE_REGION_EG,COUNTRY_GEO_NULL,TIME_ZONE_CAIRO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ESTONIA,"Estonia",LOCALE_LANGUAGE_ET,LOCALE_REGION_EE,COUNTRY_GEO_NULL,TIME_ZONE_HELSINKI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_FINLAND,"Finland",LOCALE_LANGUAGE_FI,LOCALE_REGION_FI,COUNTRY_GEO_NULL,TIME_ZONE_HELSINKI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_FRANCE_INC_GUADELOUPE,"France (inc Guadeloupe)",LOCALE_LANGUAGE_FR,LOCALE_REGION_FR,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_GEORGIA,"Georgia",LOCALE_LANGUAGE_RU,LOCALE_REGION_GE,COUNTRY_GEO_NULL,TIME_ZONE_TBILISI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_GERMANY,"Germany",LOCALE_LANGUAGE_DE,LOCALE_REGION_DE,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_GREECE,"Greece",LOCALE_LANGUAGE_EL,LOCALE_REGION_GR,COUNTRY_GEO_NULL,TIME_ZONE_ATHENS_ISTANBUL,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_HAITI,"Haiti",LOCALE_LANGUAGE_FR,LOCALE_REGION_HT,COUNTRY_GEO_NULL,TIME_ZONE_BOGOTA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_HONDURAS,"Honduras",LOCALE_LANGUAGE_ES,LOCALE_REGION_HN,COUNTRY_GEO_NULL,TIME_ZONE_CENTRAL_AMERICA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_HONG_KONG,"Hong Kong",LOCALE_LANGUAGE_ZH,LOCALE_REGION_HK,COUNTRY_GEO_NULL,TIME_ZONE_HONG_KONG,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_HUNGARY,"Hungary",LOCALE_LANGUAGE_HU,LOCALE_REGION_HU,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ICELAND,"Iceland",LOCALE_LANGUAGE_EN,LOCALE_REGION_IS,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_INDIA,"India en_US",LOCALE_LANGUAGE_EN,LOCALE_REGION_IN,COUNTRY_GEO_NULL,TIME_ZONE_KOLKATA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_INDONESIA,"Indonesia",LOCALE_LANGUAGE_IN,LOCALE_REGION_ID,COUNTRY_GEO_NULL,TIME_ZONE_HONG_KONG,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_IRELAND,"Ireland",LOCALE_LANGUAGE_EN,LOCALE_REGION_IE,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ISRAEL,"Israel iw",LOCALE_LANGUAGE_IW,LOCALE_REGION_IL,COUNTRY_GEO_NULL,TIME_ZONE_JERUSALEM,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ITALY,"Italy",LOCALE_LANGUAGE_IT,LOCALE_REGION_IT,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_JAMAICA,"Jamaica",LOCALE_LANGUAGE_EN,LOCALE_REGION_JM,COUNTRY_GEO_NULL,TIME_ZONE_EASTERN_TIME,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_JAPAN,"Japan",LOCALE_LANGUAGE_JA,LOCALE_REGION_JP,COUNTRY_GEO_NULL,TIME_ZONE_TOKYO_OSAKA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_JORDAN,"Jordan",LOCALE_LANGUAGE_AR,LOCALE_REGION_JO,COUNTRY_GEO_NULL,TIME_ZONE_AMMAN_JORDAN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_KAZAKHSTAN,"Kazakhstan",LOCALE_LANGUAGE_RU,LOCALE_REGION_KZ,COUNTRY_GEO_NULL,TIME_ZONE_MOSCOW,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_KENYA,"Kenya",LOCALE_LANGUAGE_SW,LOCALE_REGION_KE,COUNTRY_GEO_NULL,TIME_ZONE_NAIROBI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_KOREA_SOUTH,"Korea (South)",LOCALE_LANGUAGE_KO,LOCALE_REGION_KR,COUNTRY_GEO_NULL,TIME_ZONE_SEOUL,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_KUWAIT,"Kuwait",LOCALE_LANGUAGE_AR,LOCALE_REGION_KW,COUNTRY_GEO_NULL,TIME_ZONE_KUWAIT,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_LATVIA,"Latvia",LOCALE_LANGUAGE_LV,LOCALE_REGION_LV,COUNTRY_GEO_NULL,TIME_ZONE_MINSK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_LEBANON,"Lebanon",LOCALE_LANGUAGE_AR,LOCALE_REGION_LB,COUNTRY_GEO_NULL,TIME_ZONE_BEIRUT_LEBANON,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_LITHUANIA,"Lithuania",LOCALE_LANGUAGE_LT,LOCALE_REGION_LT,COUNTRY_GEO_NULL,TIME_ZONE_MINSK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_LUXEMBOURG,"Luxembourg",LOCALE_LANGUAGE_FR,LOCALE_REGION_LU,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_MACEDONIA,"Macedonia",LOCALE_LANGUAGE_EN,LOCALE_REGION_MK,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_MALAYSIA,"Malaysia",LOCALE_LANGUAGE_MS,LOCALE_REGION_MY,COUNTRY_GEO_NULL,TIME_ZONE_KUALA_LUMPUR,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_MEXICO,"Mexico",LOCALE_LANGUAGE_ES,LOCALE_REGION_MX,COUNTRY_GEO_NULL,TIME_ZONE_CHIHUAHUA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_MOLDOVA,"Moldova",LOCALE_LANGUAGE_RU,LOCALE_REGION_MD,COUNTRY_GEO_NULL,TIME_ZONE_ATHENS_ISTANBUL,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_MOROCCO,"Morocco",LOCALE_LANGUAGE_AR,LOCALE_REGION_MA,COUNTRY_GEO_NULL,TIME_ZONE_CASABLANCA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NEPAL,"Nepal",LOCALE_LANGUAGE_EN,LOCALE_REGION_NP,COUNTRY_GEO_NULL,TIME_ZONE_KATHMANDU,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NETHERLAND_ANTILLES,"Netherland Antilles",LOCALE_LANGUAGE_NL,LOCALE_REGION_AN,COUNTRY_GEO_NULL,TIME_ZONE_SANTIAGO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NETHERLANDS_INC_BONAIRE,"Netherlands (inc Bonn) nl",LOCALE_LANGUAGE_NL,LOCALE_REGION_NL,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NEW_ZEALAND,"New Zealand",LOCALE_LANGUAGE_EN,LOCALE_REGION_NZ,COUNTRY_GEO_NULL,TIME_ZONE_AUCKLAND,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NIGERIA,"Nigeria",LOCALE_LANGUAGE_EN,LOCALE_REGION_NG,COUNTRY_GEO_NULL,TIME_ZONE_WINDHOEK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NORWAY,"Norway",LOCALE_LANGUAGE_NO,LOCALE_REGION_NO,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_OMAN,"Oman",LOCALE_LANGUAGE_AR,LOCALE_REGION_OM,COUNTRY_GEO_NULL,TIME_ZONE_DUBAI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_PAKISTAN,"Pakistan",LOCALE_LANGUAGE_EN,LOCALE_REGION_PK,COUNTRY_GEO_NULL,TIME_ZONE_ISLAMABAD_KARACHI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_PARAGUAY,"Paraguay",LOCALE_LANGUAGE_ES,LOCALE_REGION_PY,COUNTRY_GEO_NULL,TIME_ZONE_SANTIAGO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_PERU,"Peru",LOCALE_LANGUAGE_ES,LOCALE_REGION_PE,COUNTRY_GEO_NULL,TIME_ZONE_EASTERN_TIME,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_PHILIPPINES,"Philippines",LOCALE_LANGUAGE_TL,LOCALE_REGION_PH,COUNTRY_GEO_NULL,TIME_ZONE_KUALA_LUMPUR,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_POLAND,"Poland",LOCALE_LANGUAGE_PL,LOCALE_REGION_PL,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_PORTUGAL,"Portugal",LOCALE_LANGUAGE_PT,LOCALE_REGION_PT,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_QATAR,"Qatar",LOCALE_LANGUAGE_AR,LOCALE_REGION_QA,COUNTRY_GEO_NULL,TIME_ZONE_MOSCOW,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ROMANIA,"Romania",LOCALE_LANGUAGE_RO,LOCALE_REGION_RO,COUNTRY_GEO_NULL,TIME_ZONE_HELSINKI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_RUSSIA,"Russia",LOCALE_LANGUAGE_RU,LOCALE_REGION_RU,COUNTRY_GEO_NULL,TIME_ZONE_VLADIVOSTOK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SAUDI_ARABIA,"Saudi Arabia",LOCALE_LANGUAGE_AR,LOCALE_REGION_SA,COUNTRY_GEO_NULL,TIME_ZONE_KUWAIT,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SERBIA,"Serbia",LOCALE_LANGUAGE_SR,LOCALE_REGION_CS,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SINGAPORE,"Singapore",LOCALE_LANGUAGE_EN,LOCALE_REGION_SG,COUNTRY_GEO_NULL,TIME_ZONE_HONG_KONG,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SLOVAKIA,"Slovakia",LOCALE_LANGUAGE_SK,LOCALE_REGION_SK,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SLOVENIA,"Slovenia",LOCALE_LANGUAGE_SL,LOCALE_REGION_SI,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SOUTH_AFRICA,"South Africa",LOCALE_LANGUAGE_EN,LOCALE_REGION_ZA,COUNTRY_GEO_NULL,TIME_ZONE_CAIRO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SPAIN,"Spain",LOCALE_LANGUAGE_ES,LOCALE_REGION_ES,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SRI_LANKA,"Sri Lanka",LOCALE_LANGUAGE_EN,LOCALE_REGION_LK,COUNTRY_GEO_NULL,TIME_ZONE_SRI_LANKA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SWEDEN,"Sweden",LOCALE_LANGUAGE_SV,LOCALE_REGION_SE,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_SWITZERLAND,"Switzerland",LOCALE_LANGUAGE_DE,LOCALE_REGION_CH,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_TAIWAN,"Taiwan",LOCALE_LANGUAGE_ZH,LOCALE_REGION_TW,COUNTRY_GEO_NULL,TIME_ZONE_TAIPEI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_THAILAND,"Thailand",LOCALE_LANGUAGE_TH,LOCALE_REGION_TH,COUNTRY_GEO_NULL,TIME_ZONE_BANGKOK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_TRINIDAD_TOBAGO,"Trinidad Tobago",LOCALE_LANGUAGE_EN,LOCALE_REGION_TT,COUNTRY_GEO_NULL,TIME_ZONE_MANAUS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_TUNISIA,"Tunisia",LOCALE_LANGUAGE_AR,LOCALE_REGION_TN,COUNTRY_GEO_NULL,TIME_ZONE_WINDHOEK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_TURKEY,"Turkey",LOCALE_LANGUAGE_TR,LOCALE_REGION_TR,COUNTRY_GEO_NULL,TIME_ZONE_JERUSALEM,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_TURKMENISTAN,"Turkmenistan",LOCALE_LANGUAGE_RU,LOCALE_REGION_TM,COUNTRY_GEO_NULL,TIME_ZONE_ISLAMABAD_KARACHI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UGANDA,"Uganda",LOCALE_LANGUAGE_EN,LOCALE_REGION_UG,COUNTRY_GEO_NULL,TIME_ZONE_TEHRAN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UKRAINE,"Ukraine",LOCALE_LANGUAGE_UK,LOCALE_REGION_UA,COUNTRY_GEO_NULL,TIME_ZONE_ATHENS_ISTANBUL,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UNITED_KINGDOM,"United Kingdom",LOCALE_LANGUAGE_EN,LOCALE_REGION_GB,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UNITED_STATES,"United States",LOCALE_LANGUAGE_EN,LOCALE_REGION_US,COUNTRY_GEO_NULL,TIME_ZONE_ARIZONA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_URUGUAY,"Uruguay",LOCALE_LANGUAGE_ES,LOCALE_REGION_UY,COUNTRY_GEO_NULL,TIME_ZONE_MONTEVIDEO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UZBEKISTAN,"Uzbekistan",LOCALE_LANGUAGE_RU,LOCALE_REGION_UZ,COUNTRY_GEO_NULL,TIME_ZONE_YEKATERINBURG,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_VENEZUELA,"Venezuela",LOCALE_LANGUAGE_ES,LOCALE_REGION_VE,COUNTRY_GEO_NULL,TIME_ZONE_VENEZUELA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_VIETNAM,"Vietnam",LOCALE_LANGUAGE_VI,LOCALE_REGION_VN,COUNTRY_GEO_NULL,TIME_ZONE_BANGKOK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NORDICS,"Nordics",LOCALE_LANGUAGE_EN,LOCALE_REGION_SE,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_BALTIC,"Baltic",LOCALE_LANGUAGE_EN,LOCALE_REGION_LT,COUNTRY_GEO_NULL,TIME_ZONE_MINSK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CZECH_SLOVAKIA,"Czech-Slovakia",LOCALE_LANGUAGE_EN,LOCALE_REGION_CZ,COUNTRY_GEO_NULL,TIME_ZONE_BRUSSELS,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_CROATIA_SLOVENIA,"Croatia-Slovenia",LOCALE_LANGUAGE_EN,LOCALE_REGION_HR,COUNTRY_GEO_NULL,TIME_ZONE_BELGRADE,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_LA_GROUP,"LA Group",LOCALE_LANGUAGE_ES,LOCALE_REGION_BO,COUNTRY_GEO_NULL,TIME_ZONE_SANTIAGO,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UNITED_ARAB_EMIRATES,"UAE ar",LOCALE_LANGUAGE_EN,LOCALE_REGION_BH,COUNTRY_GEO_NULL,TIME_ZONE_KUWAIT,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_EMAT_UK,"EMAT-UK",LOCALE_LANGUAGE_EN,LOCALE_REGION_KE,COUNTRY_GEO_NULL,TIME_ZONE_NAIROBI,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_EMAT_FR,"EMAT-FR",LOCALE_LANGUAGE_FR,LOCALE_REGION_CI,COUNTRY_GEO_NULL,TIME_ZONE_LONDON_DUBLIN,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_EMAT_PO,"EMAT-PO",LOCALE_LANGUAGE_PT,LOCALE_REGION_AO,COUNTRY_GEO_NULL,TIME_ZONE_WINDHOEK,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_INDIA_HI,"India hi",LOCALE_LANGUAGE_EN,LOCALE_REGION_IN,COUNTRY_GEO_NULL,TIME_ZONE_KOLKATA,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_UAE_EN,"UAE en",LOCALE_LANGUAGE_EN,LOCALE_REGION_BH,COUNTRY_GEO_NULL,TIME_ZONE_KUWAIT,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_ISRAEL_AR,"Israel ar",LOCALE_LANGUAGE_IW,LOCALE_REGION_IL,COUNTRY_GEO_NULL,TIME_ZONE_JERUSALEM,USER_DEFINE_NULL}, + {DEVICE_TYPE_AREA,AREA_ID_NETHERLANDS_INC_BONAIRE_ENUS,"Netherlands(inc Bonn) en_US",LOCALE_LANGUAGE_NL,LOCALE_REGION_NL,COUNTRY_GEO_NULL,TIME_ZONE_AMSTERDAM_BERLIN,USER_DEFINE_NULL}, +}; + + +static int board_id_init_data(struct board_id_private_data *board_id) +{ + int result = 0; + + memcpy(board_id->area_area_id_name, area_area_id_name, sizeof(area_area_id_name)); + memcpy(board_id->area_operator_id_name, area_operator_id_name, sizeof(area_operator_id_name)); + memcpy(board_id->area_reserve_id_name, area_reserve_id_name, sizeof(area_reserve_id_name)); + memcpy(board_id->tp_id_name, tp_id_name, sizeof(tp_id_name)); + memcpy(board_id->lcd_id_name, lcd_id_name, sizeof(lcd_id_name)); + memcpy(board_id->key_id_name, key_id_name, sizeof(key_id_name)); + memcpy(board_id->codec_id_name, codec_id_name, sizeof(codec_id_name)); + memcpy(board_id->wifi_id_name, wifi_id_name, sizeof(wifi_id_name)); + memcpy(board_id->bt_id_name, bt_id_name, sizeof(bt_id_name)); + memcpy(board_id->gps_id_name, gps_id_name, sizeof(gps_id_name)); + memcpy(board_id->fm_id_name, fm_id_name, sizeof(fm_id_name)); + memcpy(board_id->modem_id_name, modem_id_name, sizeof(modem_id_name)); + memcpy(board_id->ddr_id_name, ddr_id_name, sizeof(ddr_id_name)); + memcpy(board_id->flash_id_name, flash_id_name, sizeof(flash_id_name)); + memcpy(board_id->hdmi_id_name, hdmi_id_name, sizeof(hdmi_id_name)); + memcpy(board_id->battery_id_name, battery_id_name, sizeof(battery_id_name)); + memcpy(board_id->charge_id_name, charge_id_name, sizeof(charge_id_name)); + memcpy(board_id->backlight_id_name, backlight_id_name, sizeof(backlight_id_name)); + memcpy(board_id->headset_id_name, headset_id_name, sizeof(headset_id_name)); + memcpy(board_id->micphone_id_name, micphone_id_name, sizeof(micphone_id_name)); + memcpy(board_id->speaker_id_name, speaker_id_name, sizeof(speaker_id_name)); + memcpy(board_id->vibrator_id_name, vibrator_id_name, sizeof(vibrator_id_name)); + memcpy(board_id->tv_id_name, tv_id_name, sizeof(tv_id_name)); + memcpy(board_id->echip_id_name, echip_id_name, sizeof(echip_id_name)); + memcpy(board_id->hub_id_name, hub_id_name, sizeof(hub_id_name)); + memcpy(board_id->tpad_id_name, tpad_id_name, sizeof(tpad_id_name)); + + memcpy(board_id->pmic_id_name, pmic_id_name, sizeof(pmic_id_name)); + memcpy(board_id->regulator_id_name, regulator_id_name, sizeof(regulator_id_name)); + memcpy(board_id->rtc_id_name, rtc_id_name, sizeof(rtc_id_name)); + memcpy(board_id->camera_front_id_name, camera_front_id_name, sizeof(camera_front_id_name)); + memcpy(board_id->camera_back_id_name, camera_back_id_name, sizeof(camera_back_id_name)); + memcpy(board_id->sensor_angle_id_name, sensor_angle_id_name, sizeof(sensor_angle_id_name)); + memcpy(board_id->sensor_accel_id_name, sensor_accel_id_name, sizeof(sensor_accel_id_name)); + memcpy(board_id->sensor_compass_id_name, sensor_compass_id_name, sizeof(sensor_compass_id_name)); + memcpy(board_id->sensor_gyroscope_id_name, sensor_gyroscope_id_name, sizeof(sensor_gyroscope_id_name)); + memcpy(board_id->sensor_light_id_name, sensor_light_id_name, sizeof(sensor_light_id_name)); + memcpy(board_id->sensor_proximity_id_name, sensor_proximity_id_name, sizeof(sensor_proximity_id_name)); + memcpy(board_id->sensor_temperature_id_name, sensor_temperature_id_name, sizeof(sensor_temperature_id_name)); + memcpy(board_id->sensor_pressure_id_name, sensor_pressure_id_name, sizeof(sensor_pressure_id_name)); + + board_id->device_start_addr[DEVICE_TYPE_TP] = board_id->tp_id_name; + board_id->device_start_addr[DEVICE_TYPE_LCD] = board_id->lcd_id_name; + board_id->device_start_addr[DEVICE_TYPE_KEY] = board_id->key_id_name; + board_id->device_start_addr[DEVICE_TYPE_CODEC] = board_id->codec_id_name; + board_id->device_start_addr[DEVICE_TYPE_WIFI] = board_id->wifi_id_name; + board_id->device_start_addr[DEVICE_TYPE_BT] = board_id->bt_id_name; + board_id->device_start_addr[DEVICE_TYPE_GPS] = board_id->gps_id_name; + board_id->device_start_addr[DEVICE_TYPE_FM] = board_id->fm_id_name; + board_id->device_start_addr[DEVICE_TYPE_MODEM] = board_id->modem_id_name; + board_id->device_start_addr[DEVICE_TYPE_DDR] = board_id->ddr_id_name; + board_id->device_start_addr[DEVICE_TYPE_FLASH] = board_id->flash_id_name; + board_id->device_start_addr[DEVICE_TYPE_HDMI] = board_id->hdmi_id_name; + board_id->device_start_addr[DEVICE_TYPE_BATTERY] = board_id->battery_id_name; + board_id->device_start_addr[DEVICE_TYPE_CHARGE] = board_id->charge_id_name; + board_id->device_start_addr[DEVICE_TYPE_BACKLIGHT] = board_id->backlight_id_name; + board_id->device_start_addr[DEVICE_TYPE_HEADSET] = board_id->headset_id_name; + board_id->device_start_addr[DEVICE_TYPE_MICPHONE] = board_id->micphone_id_name; + board_id->device_start_addr[DEVICE_TYPE_SPEAKER] = board_id->speaker_id_name; + board_id->device_start_addr[DEVICE_TYPE_VIBRATOR] = board_id->vibrator_id_name; + board_id->device_start_addr[DEVICE_TYPE_TV] = board_id->tv_id_name; + board_id->device_start_addr[DEVICE_TYPE_ECHIP] = board_id->echip_id_name; + board_id->device_start_addr[DEVICE_TYPE_HUB] = board_id->hub_id_name; + board_id->device_start_addr[DEVICE_TYPE_TPAD] = board_id->tpad_id_name; + + board_id->device_start_addr[DEVICE_TYPE_PMIC] = board_id->pmic_id_name; + board_id->device_start_addr[DEVICE_TYPE_REGULATOR] = board_id->regulator_id_name; + board_id->device_start_addr[DEVICE_TYPE_RTC] = board_id->rtc_id_name; + board_id->device_start_addr[DEVICE_TYPE_CAMERA_FRONT] = board_id->camera_front_id_name; + board_id->device_start_addr[DEVICE_TYPE_CAMERA_BACK] = board_id->camera_back_id_name; + board_id->device_start_addr[DEVICE_TYPE_ANGLE] = board_id->sensor_angle_id_name; + board_id->device_start_addr[DEVICE_TYPE_ACCEL] = board_id->sensor_accel_id_name; + board_id->device_start_addr[DEVICE_TYPE_COMPASS] = board_id->sensor_compass_id_name; + board_id->device_start_addr[DEVICE_TYPE_GYRO] = board_id->sensor_gyroscope_id_name; + board_id->device_start_addr[DEVICE_TYPE_LIGHT] = board_id->sensor_light_id_name; + board_id->device_start_addr[DEVICE_TYPE_PROXIMITY] = board_id->sensor_proximity_id_name; + board_id->device_start_addr[DEVICE_TYPE_TEMPERATURE] = board_id->sensor_temperature_id_name; + board_id->device_start_addr[DEVICE_TYPE_PRESSURE] = board_id->sensor_pressure_id_name; + + + board_id->device_num_max[DEVICE_TYPE_TP] = TP_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_LCD] = LCD_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_KEY] = KEY_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_CODEC] = CODEC_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_WIFI] = WIFI_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_BT] = BT_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_GPS] = GPS_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_FM] = FM_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_MODEM] = MODEM_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_DDR] = DDR_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_FLASH] = FLASH_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_HDMI] = HDMI_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_BATTERY] = BATTERY_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_CHARGE] = CHARGE_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_BACKLIGHT] = BACKLIGHT_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_HEADSET] = HEADSET_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_MICPHONE] = MICPHONE_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_SPEAKER] = SPEAKER_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_VIBRATOR] = VIBRATOR_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_TV] = TV_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_ECHIP] = ECHIP_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_HUB] = HUB_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_TPAD] = TPAD_ID_NUMS; + + board_id->device_num_max[DEVICE_TYPE_PMIC] = PMIC_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_REGULATOR] = REGULATOR_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_RTC] = RTC_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_CAMERA_FRONT] = CAMERA_FRONT_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_CAMERA_BACK] = CAMERA_BACK_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_ANGLE] = ANGLE_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_ACCEL] = ACCEL_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_COMPASS] = COMPASS_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_GYRO] = GYRO_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_LIGHT] = LIGHT_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_PROXIMITY] = PROXIMITY_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_TEMPERATURE] = TEMPERATURE_ID_NUMS; + board_id->device_num_max[DEVICE_TYPE_PRESSURE] = PRESSURE_ID_NUMS; + + + return result; + +} + + +char board_id_get(enum type_devices type) +{ + return g_board_id->device_selected[type].id; +} +EXPORT_SYMBOL_GPL(board_id_get); + + +#include +static __init void rk30_get_vender_sector(u8 *buf) +{ +#define RK30_NANDC_BASE IOMEM(0xFEC00000) + u32 v, a; + u32 flag = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ; + + a = (u32)pgd_val(pgd_offset_k((u32)RK30_NANDC_BASE)); + v = readl_relaxed(a); + writel_relaxed(flag | ((RK30_NANDC_PHYS >> 20) << 20), a); + + memcpy(buf, RK30_NANDC_BASE + 0x1400 + 0x08, 0x200 - 0x08); + + writel_relaxed(v, a); +} + + +static __init void rk30_get_idb_sector(u8 *buf) +{ +#define RK30_NANDC_BASE IOMEM(0xFEC00000) + u32 v, a; + u32 flag = PMD_TYPE_SECT | PMD_SECT_XN | PMD_SECT_AP_WRITE | PMD_SECT_AP_READ; + + a = (u32)pgd_val(pgd_offset_k((u32)RK30_NANDC_BASE)); + v = readl_relaxed(a); + writel_relaxed(flag | ((RK30_NANDC_PHYS >> 20) << 20), a); + + memcpy(buf, RK30_NANDC_BASE + 0x1600, 0x200); + + writel_relaxed(v, a); +} + +static int board_id_vendor_data_check(char *pbuf) +{ + int sum = 0; + int i = 0; + int temp = 0; + + //for(i=DEVICE_TYPE_NULL; i> 8); + pbuf[DEVICE_TYPE_OPERATOR+1] = (20000 & 0xff); //no + pbuf[DEVICE_TYPE_RESERVE] = 0; + pbuf[DEVICE_TYPE_STATUS] = 0x01; + + pbuf[DEVICE_TYPE_TP] = TP_ID_EKTF2K; + pbuf[DEVICE_TYPE_LCD] = LCD_ID_EDID_I2C; + pbuf[DEVICE_TYPE_KEY] = KEY_ID_ENGLISH_US; + pbuf[DEVICE_TYPE_CODEC] = CODEC_ID_RT5640; + pbuf[DEVICE_TYPE_WIFI] = WIFI_ID_BCM; + pbuf[DEVICE_TYPE_BT] = BT_ID_RFKILL; + pbuf[DEVICE_TYPE_GPS] = GPS_ID_RK_HV5820; + pbuf[DEVICE_TYPE_FM] = FM_ID_NULL; + pbuf[DEVICE_TYPE_MODEM] = MODEM_ID_NULL; + pbuf[DEVICE_TYPE_DDR] = DDR_ID_NULL; + pbuf[DEVICE_TYPE_FLASH] = DDR_ID_NULL; + pbuf[DEVICE_TYPE_HDMI] = HDMI_ID_CAT66121; + pbuf[DEVICE_TYPE_BATTERY] = BATTERY_ID_BLUEBERRY; + pbuf[DEVICE_TYPE_CHARGE] = CHARGE_ID_NULL; + pbuf[DEVICE_TYPE_BACKLIGHT] = BACKLIGHT_ID_RK29; + pbuf[DEVICE_TYPE_HEADSET] = HEADSET_ID_RK29; + pbuf[DEVICE_TYPE_MICPHONE] = MICPHONE_ID_NULL; + pbuf[DEVICE_TYPE_SPEAKER] = SPEAKER_ID_1W5; + pbuf[DEVICE_TYPE_VIBRATOR] = VIBRATOR_ID_RK29; + pbuf[DEVICE_TYPE_TV] = TV_ID_NULL; + pbuf[DEVICE_TYPE_ECHIP] = ECHIP_ID_IT8561; + pbuf[DEVICE_TYPE_HUB] = HUB_ID_USB4604; + pbuf[DEVICE_TYPE_TPAD] = TPAD_ID_ELAN; + + pbuf[DEVICE_TYPE_PMIC] = PMIC_ID_NULL; + pbuf[DEVICE_TYPE_REGULATOR] = REGULATOR_ID_NULL; + pbuf[DEVICE_TYPE_RTC] = RTC_ID_HYM8563; + pbuf[DEVICE_TYPE_CAMERA_FRONT] = CAMERA_FRONT_ID_NULL; + pbuf[DEVICE_TYPE_CAMERA_BACK] = CAMERA_BACK_ID_NULL; + pbuf[DEVICE_TYPE_ANGLE] = ANGLE_ID_NULL; + pbuf[DEVICE_TYPE_ACCEL] = ACCEL_ID_NULL; + pbuf[DEVICE_TYPE_COMPASS] = COMPASS_ID_NULL; + pbuf[DEVICE_TYPE_GYRO] = GYRO_ID_NULL; + pbuf[DEVICE_TYPE_LIGHT] = LIGHT_ID_NULL; + pbuf[DEVICE_TYPE_PROXIMITY] = PROXIMITY_ID_NULL; + pbuf[DEVICE_TYPE_TEMPERATURE] = TEMPERATURE_ID_NULL; + pbuf[DEVICE_TYPE_PRESSURE] = PRESSURE_ID_NULL; + + printk("%s:vendor and idblock data is invalid,use default config\n",__func__); + + } + + return 0; + +} +EXPORT_SYMBOL_GPL(board_id_get_from_flash); + + + +int __init board_id_resolve(struct board_id_private_data *board_id) +{ + int result = 0; + int i = 0, j=0; + + board_id_get_from_flash(board_id->vendor_data, BID_MM_IOREMAP); + + board_id->area_select = board_id->area_area_id_name[(unsigned)board_id->vendor_data[DEVICE_TYPE_AREA]]; + + for(j=OPERATOR_ID_20000_NO_OPERATOR; jarea_operator_id_name[j].id == ((int)(board_id->vendor_data[DEVICE_TYPE_OPERATOR] << 8) | (int)(board_id->vendor_data[DEVICE_TYPE_OPERATOR+1]))) + { + board_id->operator_select = board_id->area_operator_id_name[j]; + break; + } + } + + board_id->reserve_select = board_id->area_reserve_id_name[(unsigned)board_id->vendor_data[DEVICE_TYPE_RESERVE]]; + + printk("%s:area type=%d,id=%d,country_area=%s,locale_region=%s,locale_language=%s\n",__func__,board_id->area_select.type,board_id->area_select.id,board_id->area_select.country_area,board_id->area_select.locale_region, board_id->area_select.locale_language); + //printk("%s:operator type=%d,id=%d,locale_region=%s,operator_name=%s\n",__func__,board_id->operator_select.type,board_id->operator_select.id,board_id->operator_select.locale_region, board_id->operator_select.operator_name); + //printk("%s:reserve type=%d,id=%d,locale_region=%s,reserve_name=%s\n",__func__,board_id->reserve_select.type,board_id->reserve_select.id,board_id->reserve_select.locale_region,board_id->reserve_select.reserve_name); + + for(j=AREA_ID_NULL; jarea_area_id_name[j].id != j) + printk("%s:type=%d, country_area=%s, id=%d != j=%d\n",__func__,board_id->area_area_id_name[j].type, board_id->area_area_id_name[j].country_area, board_id->area_area_id_name[j].id, j); + } + + for(i=DEVICE_TYPE_TP; idevice_selected[i] = board_id->device_start_addr[i][(unsigned)board_id->vendor_data[i]]; + + if(board_id->device_selected[i].id != board_id->vendor_data[i]) + printk("%s:id error! device_selected[%d].id = %d, vendor_data[%d] =%d\n",__func__, i, board_id->device_selected[i].id, i, board_id->vendor_data[i]); + + for(j=0; jdevice_num_max[i]; j++) + { + if(board_id->device_start_addr[i][j].id != j) + printk("%s:warning type=%d, name=%s,id=%d != j=%d\n",__func__, board_id->device_start_addr[i][j].type, board_id->device_start_addr[i][j].type_name, board_id->device_start_addr[i][j].id, j); + } + + //printk("buf[%d].id = %d,type=%s, dev=%s\n",i, board_id->device_selected[i].id, board_id->device_selected[i].type_name, board_id->device_selected[i].dev_name); + } + printk("\n"); + + return result; +} + + +static int __init board_id_add_devices(struct board_id_private_data *board_id, struct board_device_table *device_table, int device_table_size) +{ + int num = 0; + int i = 0, j=0, k=0; + struct i2c_board_info *i2c_info_temp = NULL; + struct spi_board_info *spi_info_temp = NULL; + struct platform_device **devices = NULL; + struct valid_invalid_name *valid_name = NULL; + char *buf = board_id->vendor_data; + struct device_id_name *device_id_name_start = board_id->tp_id_name; + + if(device_table[BOARD_DEVICE_TYPE_VALID].type == BOARD_DEVICE_TYPE_VALID) + valid_name = (struct valid_invalid_name*)device_table[BOARD_DEVICE_TYPE_VALID].addr; + + for(num=0; numdevice_start_addr[j]; + + for(k=0; kdevice_num_max[j]; k++) + { + if(!device_id_name_start) + { + printk("%s:address is null,type=%d,id=%d\n",__func__, j, k); + break; + } + + if((device_id_name_start->type == j) && (buf[j] == device_id_name_start->id) && (!strcmp(i2c_info_temp[i].type, device_id_name_start->driver_name))) + { + i2c_register_board_info(device_table[num].bus, &i2c_info_temp[i], 1); + printk("%s:i2c%d_info[%d] name=%s,type=%d,id=%d\n",__func__, device_table[num].bus, i, i2c_info_temp[i].type, device_id_name_start->type, device_id_name_start->id); + } + + device_id_name_start++; + } + + } + + + } + + break; + + case BOARD_DEVICE_TYPE_SPI: + spi_info_temp = (struct spi_board_info *)device_table[num].addr; + if(!spi_info_temp) + continue; + + + for(i=0; idevice_start_addr[j]; + + for(k=0; kdevice_num_max[j]; k++) + { + if(!device_id_name_start) + { + printk("%s:address is null,type=%d,id=%d\n",__func__, j, k); + break; + } + + if((device_id_name_start->type == j) && (buf[j] == device_id_name_start->id) && (!strcmp(spi_info_temp[i].modalias, device_id_name_start->driver_name))) + { + spi_register_board_info(&spi_info_temp[i], 1); + printk("%s:spi%d_info[%d] name=%s,type=%d,id=%d\n",__func__, spi_info_temp[i].bus_num, i, spi_info_temp[i].modalias, device_id_name_start->type, device_id_name_start->id); + } + + device_id_name_start++; + } + + } + + + } + + break; + + case BOARD_DEVICE_TYPE_PLATFORM: + devices = (struct platform_device**)(device_table[num].addr); + if(!devices) + continue; + + for(i=0; iname, valid_name[j].name)) + { + platform_add_devices(&devices[i], 1); + printk("%s:devices[%d] name=%s valid always\n",__func__, i, devices[i]->name); + continue; + } + } + + + for(j=DEVICE_TYPE_TP; jdevice_start_addr[j]; + + for(k=0; kdevice_num_max[j]; k++) + { + if(!device_id_name_start) + { + printk("%s:address is null,type=%d,id=%d\n",__func__, j, k); + break; + } + + if((device_id_name_start->type == j) && (buf[j] == device_id_name_start->id) && (!strcmp(devices[i]->name, device_id_name_start->driver_name))) + { + platform_add_devices(&devices[i], 1); + + printk("%s:devices[%d] name=%s,type=%d, id=%d\n",__func__, i, devices[i]->name, device_id_name_start->type, device_id_name_start->id); + + } + + device_id_name_start++; + } + + } + } + + + break; + + default: + printk("%s:ignore type=%d\n",__func__, device_table[num].type); + break; + + } + + + } + + return 0; + +} + + + +static int __init board_id_probe(struct platform_device *pdev) +{ + struct board_id_platform_data *pdata = pdev->dev.platform_data; + struct board_id_private_data *board_id = NULL; + int i = 0, result; + + if(!pdata) + return -1; + + if(pdata->init_platform_hw) + pdata->init_platform_hw(); + + board_id = kzalloc(sizeof(struct board_id_private_data), GFP_KERNEL); + if(board_id == NULL) + { + printk("%s:fail malloc board_id data\n",__func__); + return -1; + } + + result = board_id_init_data(board_id); + if (result < 0) { + printk("%s:copydata error\n",__func__); + return result; + } + + result = board_id_resolve(board_id); + if (result < 0) { + printk("%s:resolve boardid error\n",__func__); + return result; + } + + + if(pdata->device_table && pdata->device_table_size) + board_id_add_devices(board_id, pdata->device_table, pdata->device_table_size); + + board_id->pdata = pdata; + board_id->dev = &pdev->dev; + + + platform_set_drvdata(pdev, board_id); + + mutex_init(&board_id->operation_mutex); + + g_board_id = board_id; + + printk("%s:init success\n",__func__); + return result; + +} + +int board_id_suspend(struct platform_device *pdev, pm_message_t state) +{ + struct board_id_private_data *board_id = platform_get_drvdata(pdev); + + + return 0; +} + +int board_id_resume(struct platform_device *pdev) +{ + struct board_id_private_data *board_id = platform_get_drvdata(pdev); + + + return 0; +} + +void board_id_shutdown(struct platform_device *pdev) +{ + struct board_id_private_data *board_id = platform_get_drvdata(pdev); + + +} + +static struct platform_driver board_id_driver = { + //.shutdown = board_id_shutdown, + .suspend = board_id_suspend, + .resume = board_id_resume, + .driver = { + .name = "board_id", + .owner = THIS_MODULE, + }, +}; + +static int __init board_id_init(void) +{ + return platform_driver_probe(&board_id_driver, board_id_probe); +} + +static void __exit board_id_exit(void) +{ + platform_driver_unregister(&board_id_driver); +} + +//arch_initcall_sync(board_id_init); +arch_initcall(board_id_init); +module_exit(board_id_exit); + +MODULE_AUTHOR("ROCKCHIP Corporation:lw@rock-chips.com"); +MODULE_DESCRIPTION("rockchip board id driver"); +MODULE_LICENSE("GPL"); + diff --git a/arch/arm/plat-rk/include/plat/board.h b/arch/arm/plat-rk/include/plat/board.h index ad7070ddd86b..c71fa0455358 100755 --- a/arch/arm/plat-rk/include/plat/board.h +++ b/arch/arm/plat-rk/include/plat/board.h @@ -232,8 +232,11 @@ struct sensor_platform_data { struct board_id_platform_data { int gpio_pin[32]; int num_gpio; - int (*init_platform_hw)(void); + char *board_id_buf; + int (*init_platform_hw)(void); int (*exit_platform_hw)(void); + struct board_device_table *device_table; + int device_table_size; int (*init_parameter)(int id); }; diff --git a/include/linux/board-id-hw.h b/include/linux/board-id-hw.h new file mode 100755 index 000000000000..f8909084a2b7 --- /dev/null +++ b/include/linux/board-id-hw.h @@ -0,0 +1,18 @@ + +enum board_id_hw{ + BOARD_ID_INVALID = -1, + + BOARD_ID_DS763 = 0, + BOARD_ID_C8002, + BOARD_ID_C8003, + BOARD_ID_C1014, + BOARD_ID_C7018, + BOARD_ID_TA7CP01, + BOARD_ID_TA9CP01, + BOARD_ID_TA0CP01, + + BOARD_ID_AIO_BAT, + BOARD_ID_AIO_NOBAT, + + BOARD_ID_NUM, +}; diff --git a/include/linux/board-id-operator.h b/include/linux/board-id-operator.h new file mode 100755 index 000000000000..e4d2f5ebdec3 --- /dev/null +++ b/include/linux/board-id-operator.h @@ -0,0 +1,1018 @@ +#ifndef __BOARD_ID_OPERATOR_H +#define __BOARD_ID_OPERATOR_H + +#define RESERVE_ID_NUMS 1 + +enum id_operator{ + OPERATOR_ID_20000_NO_OPERATOR, + OPERATOR_ID_20201_COSMOTE_GR, + OPERATOR_ID_20205_VODAFONE_GR, + OPERATOR_ID_20210_TELESTET_GR, + OPERATOR_ID_20404_VODAFONE_NL_NL, + OPERATOR_ID_20408_KPN_NL, + OPERATOR_ID_20412_O2_NL_NL, + OPERATOR_ID_20416_BEN_NL, + OPERATOR_ID_20420_DUTCHTONE_NL, + OPERATOR_ID_20601_PROXIMUS_BE, + OPERATOR_ID_20610_MOBISTAR_BE, + OPERATOR_ID_20620_ORANGE_BE, + OPERATOR_ID_20801_ORANGE_FR, + OPERATOR_ID_20810_SFR_FR, + OPERATOR_ID_20820_BOUYGTEL_FR, + OPERATOR_ID_21303_MOBILAND_AD, + OPERATOR_ID_21401_VODAFONE_E_ES, + OPERATOR_ID_21402_MOVISTAR_ES, + OPERATOR_ID_21403_AMENA_ES, + OPERATOR_ID_21404_XFERA_ES, + OPERATOR_ID_21407_MOVISTAR_ES, + OPERATOR_ID_21601_PANNON_GSM_HU, + OPERATOR_ID_21630_WESTEL_HU, + OPERATOR_ID_21670_VODAFONE_HU, + OPERATOR_ID_21803_ERONET_BA, + OPERATOR_ID_21805_MOBILNA_SRPSKA_BA, + OPERATOR_ID_21890_GSM_BIH_BA, + OPERATOR_ID_21901_CRONET_HR, + OPERATOR_ID_21910_VIP_HR, + OPERATOR_ID_22001_MOBTEL_YU, + OPERATOR_ID_22002_PROMONTE_YU, + OPERATOR_ID_22003_TELEKOM_SRBIJA_YU, + OPERATOR_ID_22004_MONET_YU, + OPERATOR_ID_22201_TIM_IT, + OPERATOR_ID_22210_VODAFONE_IT_IT, + OPERATOR_ID_22288_WIND_IT, + OPERATOR_ID_22298_BLU_SPA_IT, + OPERATOR_ID_22601_CONNEX_RO, + OPERATOR_ID_22603_COSMOROM_RO, + OPERATOR_ID_22610_DIALOG_RO, + OPERATOR_ID_22801_SWISS_GSM_CH, + OPERATOR_ID_22802_SUNRISE_CH, + OPERATOR_ID_22803_ORANGE_CH, + OPERATOR_ID_23001_PAEGAS_CZ, + OPERATOR_ID_23002_EUROTEL_CZ, + OPERATOR_ID_23003_OSKAR_CZ, + OPERATOR_ID_23101_GLOBTEL_SK, + OPERATOR_ID_23102_EUROTEL_SK, + OPERATOR_ID_23201_A1_AT, + OPERATOR_ID_23203_T_MOBILE_AT, + OPERATOR_ID_23205_ONE_AT, + OPERATOR_ID_23207_TELE_RING_AT, + OPERATOR_ID_23410_O2_UK_GB, + OPERATOR_ID_23415_VODAFONE_GB, + OPERATOR_ID_23430_T_MOBILE_UK_GB, + OPERATOR_ID_23431_T_MOBILE_UK_GB, + OPERATOR_ID_23432_T_MOBILE_UK_GB, + OPERATOR_ID_23433_ORANGE_GB, + OPERATOR_ID_23450_JT_GSM_GB, + OPERATOR_ID_23455_GUERNSEY_TEL_GB, + OPERATOR_ID_23458_MANX_GB, + OPERATOR_ID_23801_TDK_MOBIL_DK, + OPERATOR_ID_23802_SONOFON_DK, + OPERATOR_ID_23820_TELIA_DK, + OPERATOR_ID_23830_ORANGE_DK, + OPERATOR_ID_24001_TELIA_S_SE, + OPERATOR_ID_24007_IQ_SE, + OPERATOR_ID_24008_VODAFONE_SE, + OPERATOR_ID_24201_TELENOR_NO, + OPERATOR_ID_24202_NETCOM_NO, + OPERATOR_ID_24403_TELIA_FI, + OPERATOR_ID_24405_RADIOLINJA_FI, + OPERATOR_ID_24409_FINNET_FI, + OPERATOR_ID_24412_2G_FI, + OPERATOR_ID_24414_AMT_FI, + OPERATOR_ID_24491_SONERA_FI, + OPERATOR_ID_24601_OMNITEL_LT, + OPERATOR_ID_24602_BITE_GSM_LT, + OPERATOR_ID_24603_TELE2_LT, + OPERATOR_ID_24701_LMT_GSM_LV, + OPERATOR_ID_24702_BALTCOM_LV, + OPERATOR_ID_24801_EMT_GSM_EE, + OPERATOR_ID_24802_RLE_EE, + OPERATOR_ID_24803_Q_GSM_EE, + OPERATOR_ID_25001_MTS_RU, + OPERATOR_ID_25002_NORTHWEST_GSM_RU, + OPERATOR_ID_25003_NCC_RU, + OPERATOR_ID_25005_SCS_RU, + OPERATOR_ID_25007_SMARTS_RU, + OPERATOR_ID_25010_DTC_RU, + OPERATOR_ID_25011_ORENSOT_RU, + OPERATOR_ID_25012_FAR_EAST_RU, + OPERATOR_ID_25013_KUBAN_GSM_RU, + OPERATOR_ID_25016_NTC_RU, + OPERATOR_ID_25017_ERMAK_RMS_RU, + OPERATOR_ID_25028_EXTEL_RU, + OPERATOR_ID_25039_URALTEL_RU, + OPERATOR_ID_25044_NC_GSM_RU, + OPERATOR_ID_25091_SONIC_DUO_RU, + OPERATOR_ID_25092_PRIMTEL_RU, + OPERATOR_ID_25093_JSC_TELECOM_XXI_RU, + OPERATOR_ID_25099_BEE_LINE_RU, + OPERATOR_ID_25501_UMC_UA, + OPERATOR_ID_25502_WELLCOM_UA, + OPERATOR_ID_25503_KYIVSTAR_UA, + OPERATOR_ID_25505_GOLDEN_TELECOM_UA, + OPERATOR_ID_25701_VELCOM_BY, + OPERATOR_ID_25901_VOXTEL_MD, + OPERATOR_ID_25902_MOLDCELL_MD, + OPERATOR_ID_26001_PLUS_GSM_PL, + OPERATOR_ID_26002_ERA_GSM_PL, + OPERATOR_ID_26003_IDEA_PL, + OPERATOR_ID_26201_T_MOBILE_DE, + OPERATOR_ID_26202_VODAFONE_D2_DE, + OPERATOR_ID_26203_E_PLUS_DE, + OPERATOR_ID_26207_O2_DE_DE, + OPERATOR_ID_26213_MOBILCOM_DE, + OPERATOR_ID_26601_GIBTEL_GI, + OPERATOR_ID_26801_VODAFONE_PT, + OPERATOR_ID_26803_OPTIMUS_PT, + OPERATOR_ID_26806_TMN_PT, + OPERATOR_ID_27001_LUXGSM_LU, + OPERATOR_ID_27077_TANGO_LU, + OPERATOR_ID_27201_VODAFONE_IRL_IE, + OPERATOR_ID_27202_O2_IRL_IE, + OPERATOR_ID_27203_METEOR_IE, + OPERATOR_ID_27401_SIMINN_IS, + OPERATOR_ID_27402_TAL_IS, + OPERATOR_ID_27404_VIKING_IS, + OPERATOR_ID_27601_AMC_AL, + OPERATOR_ID_27602_VODAFONE_AL, + OPERATOR_ID_27801_VODAFONE_MALTA_MT, + OPERATOR_ID_27821_GO_MOBILE_MT, + OPERATOR_ID_28001_CYTAGSM_CY, + OPERATOR_ID_28201_GEOCELL_GE, + OPERATOR_ID_28202_MAGTI_GSM_GE, + OPERATOR_ID_28203_GEO_03_GE, + OPERATOR_ID_28301_ARMGSM_AM, + OPERATOR_ID_28401_M_TEL_GSM_BG, + OPERATOR_ID_28601_TURKCELL_TR, + OPERATOR_ID_28602_TELSIM_TR, + OPERATOR_ID_28603_ARIA_TR, + OPERATOR_ID_28604_AYCELL_TR, + OPERATOR_ID_28801_FT_GSM_FO, + OPERATOR_ID_29001_TELE_GREENLAND_GR, + OPERATOR_ID_29340_SI_MOBIL_SI, + OPERATOR_ID_29341_MOBITEL_SI, + OPERATOR_ID_29401_MOBIMAK_MK, + OPERATOR_ID_29501_TELECOM_LI, + OPERATOR_ID_29502_MONTEL_LI, + OPERATOR_ID_29505_FL1_LI, + OPERATOR_ID_29577_LI_TANGO_LI, + OPERATOR_ID_30237_MICROCELL_CA, + OPERATOR_ID_30272_ROGERS_AT_T_CA, + OPERATOR_ID_31001_CELLNET_US, + OPERATOR_ID_31011_WIRELESS_2000_US, + OPERATOR_ID_31015_CINGULAR_US, + OPERATOR_ID_31016_T_MOBILE_US, + OPERATOR_ID_31017_CINGULAR_US, + OPERATOR_ID_31018_CINGULAR_US, + OPERATOR_ID_31020_T_MOBILE_US, + OPERATOR_ID_31021_T_MOBILE_US, + OPERATOR_ID_31022_T_MOBILE_US, + OPERATOR_ID_31023_T_MOBILE_US, + OPERATOR_ID_31024_T_MOBILE_US, + OPERATOR_ID_31025_T_MOBILE_US, + OPERATOR_ID_31026_T_MOBILE_US, + OPERATOR_ID_31027_T_MOBILE_US, + OPERATOR_ID_31031_T_MOBILE_US, + OPERATOR_ID_31034_WESTLINK_US, + OPERATOR_ID_31035_CAROLINA_US, + OPERATOR_ID_31038_AT_T_WIRELESS_US, + OPERATOR_ID_31041_CINGULAR_US, + OPERATOR_ID_31046_TMP_CORP_US, + OPERATOR_ID_31058_T_MOBILE_US, + OPERATOR_ID_31061_EPIC_TOUCH_US, + OPERATOR_ID_31063_AMERILINK_US, + OPERATOR_ID_31064_EINSTEIN_PCS_US, + OPERATOR_ID_31066_T_MOBILE_US, + OPERATOR_ID_31067_WIRELESS_2000_US, + OPERATOR_ID_31068_NPI_WIRELESS_US, + OPERATOR_ID_31069_CONESTOGA_US, + OPERATOR_ID_31074_TELEMETRIX_US, + OPERATOR_ID_31076_PTSI_US, + OPERATOR_ID_31077_IOWA_WIRELESS_US, + OPERATOR_ID_31078_AIRLINK_PCS_US, + OPERATOR_ID_31079_PINPOINT_US, + OPERATOR_ID_31080_T_MOBILE_US, + OPERATOR_ID_31098_AWS_US, + OPERATOR_ID_31114_SPROCKET_UNKNOW, + OPERATOR_ID_31601_NEXTEL_UNKNOW, + OPERATOR_ID_33805_DIGICEL_JM, + OPERATOR_ID_34001_ORANGE_FW, + OPERATOR_ID_34020_BOUYGUES_FW, + OPERATOR_ID_34430_APUA_PCS_AG, + OPERATOR_ID_35001_TELECOM_BM, + OPERATOR_ID_36251_TELCELL_GSM_AN, + OPERATOR_ID_36801_C_COM_CU, + OPERATOR_ID_37001_ORANGE_DO, + OPERATOR_ID_40001_AZERCELL_GSM_AZ, + OPERATOR_ID_40002_BAKCELL_GSM_2000_AZ, + OPERATOR_ID_40101_K_MOBILE_KZ, + OPERATOR_ID_40102_K_CELL_KZ, + OPERATOR_ID_40401_HUTCH_IN, + OPERATOR_ID_40402_AIRTEL_IN, + OPERATOR_ID_40403_AIRTEL_IN, + OPERATOR_ID_40404_IDEA_IN, + OPERATOR_ID_40405_HUTCH_IN, + OPERATOR_ID_40407_IDEA_IN, + OPERATOR_ID_40409_RELIANCE_IN, + OPERATOR_ID_40410_AIRTEL_IN, + OPERATOR_ID_40411_HUTCH_IN, + OPERATOR_ID_40412_IDEA_IN, + OPERATOR_ID_40413_HUTCH_IN, + OPERATOR_ID_40414_SPICE_IN, + OPERATOR_ID_40415_HUTCH_IN, + OPERATOR_ID_40416_AIRTEL_IN, + OPERATOR_ID_40418_RELIANCE_IN, + OPERATOR_ID_40419_IDEA_IN, + OPERATOR_ID_40420_HUTCH_IN, + OPERATOR_ID_40421_BPL_MOBILE_IN, + OPERATOR_ID_40422_IDEA_IN, + OPERATOR_ID_40424_IDEA_IN, + OPERATOR_ID_40427_HUTCH_IN, + OPERATOR_ID_40429_AIRCEL_IN, + OPERATOR_ID_40430_HUTCH_IN, + OPERATOR_ID_40431_AIRTEL_IN, + OPERATOR_ID_40434_CELLONE_IN, + OPERATOR_ID_40436_RELIANCE_IN, + OPERATOR_ID_40437_AIRCEL_IN, + OPERATOR_ID_40438_CELLONE_IN, + OPERATOR_ID_40440_AIRTEL_IN, + OPERATOR_ID_40441_RPG_IN, + OPERATOR_ID_40443_HUTCH_IN, + OPERATOR_ID_40444_SPICE_IN, + OPERATOR_ID_40445_AIRTEL_IN, + OPERATOR_ID_40446_HUTCH_IN, + OPERATOR_ID_40449_AIRTEL_IN, + OPERATOR_ID_40450_RELIANCE_IN, + OPERATOR_ID_40451_CELLONE_IN, + OPERATOR_ID_40452_RELIANCE_IN, + OPERATOR_ID_40453_CELLONE_IN, + OPERATOR_ID_40454_CELLONE_IN, + OPERATOR_ID_40455_CELLONE_IN, + OPERATOR_ID_40456_IDEA_IN, + OPERATOR_ID_40457_CELLONE_IN, + OPERATOR_ID_40458_CELLONE_IN, + OPERATOR_ID_40459_CELLONE_IN, + OPERATOR_ID_40460_HUTCH_IN, + OPERATOR_ID_40462_CELLONE_IN, + OPERATOR_ID_40464_CELLONE_IN, + OPERATOR_ID_40466_CELLONE_IN, + OPERATOR_ID_40467_RELIANCE_IN, + OPERATOR_ID_40468_DOLPHIN_IN, + OPERATOR_ID_40469_MTNL_IN, + OPERATOR_ID_40470_AIRTEL_IN, + OPERATOR_ID_40471_CELLONE_IN, + OPERATOR_ID_40472_CELLONE_IN, + OPERATOR_ID_40473_CELLONE_IN, + OPERATOR_ID_40474_CELLONE_IN, + OPERATOR_ID_40475_CELLONE_IN, + OPERATOR_ID_40476_CELLONE_IN, + OPERATOR_ID_40477_CELLONE_IN, + OPERATOR_ID_40478_IDEA_IN, + OPERATOR_ID_40479_CELLONE_IN, + OPERATOR_ID_40480_CELLONE_IN, + OPERATOR_ID_40481_CELLONE_IN, + OPERATOR_ID_40482_IDEA_IN, + OPERATOR_ID_40483_RELIANCE_IN, + OPERATOR_ID_40484_HUTCH_IN, + OPERATOR_ID_40485_RELIANCE_IN, + OPERATOR_ID_40486_HUTCH_IN, + OPERATOR_ID_40487_IDEA_IN, + OPERATOR_ID_40488_HUTCH_IN, + OPERATOR_ID_40489_IDEA_IN, + OPERATOR_ID_40490_AIRTEL_IN, + OPERATOR_ID_40492_AIRTEL_IN, + OPERATOR_ID_40493_AIRTEL_IN, + OPERATOR_ID_40494_AIRTEL_IN, + OPERATOR_ID_40495_AIRTEL_IN, + OPERATOR_ID_40496_AIRTEL_IN, + OPERATOR_ID_40497_AIRTEL_IN, + OPERATOR_ID_40498_AIRTEL_IN, + OPERATOR_ID_40551_AIRTEL_IN, + OPERATOR_ID_40552_AIRTEL_IN, + OPERATOR_ID_40553_AIRTEL_IN, + OPERATOR_ID_40554_AIRTEL_IN, + OPERATOR_ID_40555_AIRTEL_IN, + OPERATOR_ID_40556_AIRTEL_IN, + OPERATOR_ID_40566_HUTCH_IN, + OPERATOR_ID_40567_HUTCH_IN_, + OPERATOR_ID_41001_MOBILINK_PK, + OPERATOR_ID_41302_DIALOG_LK, + OPERATOR_ID_41303_CELLTEL_LK, + OPERATOR_ID_41401_MM_900_MM, + OPERATOR_ID_41501_CELLIS_LB, + OPERATOR_ID_41503_LIBANCELL_LB, + OPERATOR_ID_41601_FASTLINK_JO, + OPERATOR_ID_41677_MOBILECOM_JO, + OPERATOR_ID_41702_SPACETEL_SY, + OPERATOR_ID_41709_MOBILE_SYRIA_SY, + OPERATOR_ID_41902_MTCNET_KW, + OPERATOR_ID_41903_WATANIYA_KW, + OPERATOR_ID_42001_AL_JAWAL_SA, + OPERATOR_ID_42007_EAE_SA, + OPERATOR_ID_42102_SPACETEL_YE, + OPERATOR_ID_42202_OMAN_MOBILE_OM, + OPERATOR_ID_42402_ETISALAT_AE, + OPERATOR_ID_42501_ORANGE_IL, + OPERATOR_ID_42505_JAWWAL_IL, + OPERATOR_ID_42601_MOBILE_PLUS_BH, + OPERATOR_ID_42701_QATARNET_QA, + OPERATOR_ID_42899_MOBICOM_MN, + OPERATOR_ID_42901_NTC_NP, + OPERATOR_ID_43211_TCI_IR, + OPERATOR_ID_43214_KISH_IR, + OPERATOR_ID_43401_BUZTEL_UZ, + OPERATOR_ID_43402_UZMACOM_UZ, + OPERATOR_ID_43404_UZB_DAEWOO_GSM_UZ, + OPERATOR_ID_43405_COSCOM_UZ, + OPERATOR_ID_43701_BITEL_KG, + OPERATOR_ID_43801_BCTI_TM, + OPERATOR_ID_45201_MOBIFONE_VN, + OPERATOR_ID_45202_VINAFONE_VN, + OPERATOR_ID_45400_CSL_HK, + OPERATOR_ID_45401_NEW_WORLD_HK, + OPERATOR_ID_45402_CSL_HK, + OPERATOR_ID_45404_ORANGE_HK, + OPERATOR_ID_45406_SMC_HK, + OPERATOR_ID_45410_NEW_WORLD_HK, + OPERATOR_ID_45412_PEOPLES_HK, + OPERATOR_ID_45416_SUNDAY_HK, + OPERATOR_ID_45418_HK_TELECOM_HK, + OPERATOR_ID_45500_SMARTONE_UNKNOW, + OPERATOR_ID_45501_CTMGSM_UNKNOW, + OPERATOR_ID_45503_HT_MACAU_UNKNOW, + OPERATOR_ID_45601_MOBITEL_KH, + OPERATOR_ID_45602_SAMART_GSM_KH, + OPERATOR_ID_45701_LAO_GSM_LA, + OPERATOR_ID_46000_CHINA_MOBILE_CN, + OPERATOR_ID_46001_CHN_CUGSM_CN, + OPERATOR_ID_46002_CHINA_MOBILE_CN, + OPERATOR_ID_46601_FAR_EASTONE_TW, + OPERATOR_ID_46606_TUNTEX_TW, + OPERATOR_ID_46668_ACES_TW, + OPERATOR_ID_46688_KGT_TW, + OPERATOR_ID_46692_CHUNGHWA_TW, + OPERATOR_ID_46693_MOBITAI_TW, + OPERATOR_ID_46697_TWN_GSM_TW, + OPERATOR_ID_46699_TRANSASIA_TW, + OPERATOR_ID_47001_GRAMEEMPHONE_BD, + OPERATOR_ID_47002_AKTEL_BD, + OPERATOR_ID_47003_SHEBAWORLD_BD, + OPERATOR_ID_47019_MOBILE_2000_BD, + OPERATOR_ID_47201_DHIMOBILE_MV, + OPERATOR_ID_50212_MAXIS_MOBILE_MY, + OPERATOR_ID_50213_TM_TOUCH_MY, + OPERATOR_ID_50216_DIGI_MY, + OPERATOR_ID_50217_ADAM_MY, + OPERATOR_ID_50219_CELCOM_MY, + OPERATOR_ID_50501_MOBILENET_AU, + OPERATOR_ID_50502_OPTUS_AU, + OPERATOR_ID_50503_VODAFONE_AU, + OPERATOR_ID_50508_ONE_TEL_AU, + OPERATOR_ID_51000_ACES_ID, + OPERATOR_ID_51001_SATELINDOCEL_ID, + OPERATOR_ID_51008_LIPPO_TEL_ID, + OPERATOR_ID_51010_TELKOMSEL_ID, + OPERATOR_ID_51011_GSM_XL_ID, + OPERATOR_ID_51021_INDOSAT_ID, + OPERATOR_ID_51501_ISLACOM_PH, + OPERATOR_ID_51502_GLOBE_PH, + OPERATOR_ID_51503_SMART_PH, + OPERATOR_ID_51505_DIGITEL_PH, + OPERATOR_ID_51511_ACES_PH, + OPERATOR_ID_52001_AIS_GSM_TH, + OPERATOR_ID_52015_ACT_MOBILE_TH, + OPERATOR_ID_52018_WP_1800_TH, + OPERATOR_ID_52020_ACES_TH, + OPERATOR_ID_52023_HELLO_TH, + OPERATOR_ID_52099_ORANGE_TH, + OPERATOR_ID_52501_ST_GSM_SGP_SG, + OPERATOR_ID_52502_ST_GSM1800_SGP_SG, + OPERATOR_ID_52503_M1_GSM_SGP_SG, + OPERATOR_ID_52504_SGP_M1_3GSM_SG, + OPERATOR_ID_52505_STARHUB_SGP_SG, + OPERATOR_ID_52811_BRU_TSTCOM_BN, + OPERATOR_ID_53001_VODAFONE_NZ, + OPERATOR_ID_53901_TONGA_COMM_TO, + OPERATOR_ID_54100_ACES_VU, + OPERATOR_ID_54101_SMILE_VU, + OPERATOR_ID_54201_VODAFONE_FJ, + OPERATOR_ID_54411_BLUE_SKY_AS, + OPERATOR_ID_54601_MOBILIS_NC, + OPERATOR_ID_54720_VINI_PF, + OPERATOR_ID_55001_FSM_FM, + OPERATOR_ID_60201_MOBINIL_EG, + OPERATOR_ID_60202_CLICK_GSM_EG, + OPERATOR_ID_60301_AMN_DZ, + OPERATOR_ID_60400_MEDITEL_MA, + OPERATOR_ID_60401_IAM_MA, + OPERATOR_ID_60502_TUNICELL_TN, + OPERATOR_ID_60801_ALIZE_SN, + OPERATOR_ID_60802_SENTEL_SN, + OPERATOR_ID_61001_MALITEL_ML, + OPERATOR_ID_61101_MOBILIS_GN, + OPERATOR_ID_61102_LAGUI_GN, + OPERATOR_ID_61201_CORA_CI, + OPERATOR_ID_61203_IVOIRIS_CI, + OPERATOR_ID_61205_TELECEL_CI, + OPERATOR_ID_61302_CELTEL_BF, + OPERATOR_ID_61402_CELTEL_NE, + OPERATOR_ID_61501_TOGOCEL_TG, + OPERATOR_ID_61601_LIBERCOM_BJ, + OPERATOR_ID_61602_TELECEL_BENIN_BJ, + OPERATOR_ID_61603_BENINCELL_BJ, + OPERATOR_ID_61701_CELLPLUS_MU, + OPERATOR_ID_61710_EMTEL_MU, + OPERATOR_ID_61801_OMEGA_LR, + OPERATOR_ID_62001_SPACEFON_GH, + OPERATOR_ID_62002_ONETOUCH_GH, + OPERATOR_ID_62003_MOBITEL_GH, + OPERATOR_ID_62100_MTN_NG, + OPERATOR_ID_62120_ECONET_NG, + OPERATOR_ID_62130_MTN_NG, + OPERATOR_ID_62140_NITEL_GSM_NG, + OPERATOR_ID_62201_CELTEL_TD, + OPERATOR_ID_62202_LIBERTIS_TD, + OPERATOR_ID_62401_MTN_CAM_CM, + OPERATOR_ID_62402_MOBILIS_CM, + OPERATOR_ID_62501_CPV_MOVEL_CV, + OPERATOR_ID_62801_LIBERTIS_GA, + OPERATOR_ID_62802_GO_CELTEL_GA, + OPERATOR_ID_62803_CELTEL_GA, + OPERATOR_ID_62901_CELTEL_CG, + OPERATOR_ID_62910_LIBERTIS_CG, + OPERATOR_ID_63001_CELLNET_CD, + OPERATOR_ID_63002_CELTEL_CD, + OPERATOR_ID_63004_CELLCO_CD, + OPERATOR_ID_63089_OASIS_CD, + OPERATOR_ID_63301_SEYCEL_SC, + OPERATOR_ID_63310_AIRTEL_SC, + OPERATOR_ID_63401_MOBITEL_MZ, + OPERATOR_ID_63510_RWANDACELL_RW, + OPERATOR_ID_63601_ETMTN_ET, + OPERATOR_ID_63701_BARAKAAT_SO, + OPERATOR_ID_63902_SAFARICOM_KE, + OPERATOR_ID_63903_KENCELL_KE, + OPERATOR_ID_64001_TRITEL_TZ, + OPERATOR_ID_64002_MOBITEL_TZ, + OPERATOR_ID_64003_ZANTEL_TZ, + OPERATOR_ID_64004_VODACOM_TZ, + OPERATOR_ID_64005_CELTEL_TZ, + OPERATOR_ID_64101_CELTEL_UG, + OPERATOR_ID_64110_MTN_UGANDA_UG, + OPERATOR_ID_64111_UTL_TELECEL_UG, + OPERATOR_ID_64201_SPACETEL_BI, + OPERATOR_ID_64202_SAFARIS_BI, + OPERATOR_ID_64301_MCEL_UNKNOW, + OPERATOR_ID_64501_ZAMCELL_UNKNOW, + OPERATOR_ID_64502_TELECEL_UNKNOW, + OPERATOR_ID_64601_MADACOM_MG, + OPERATOR_ID_64602_ANTARIS_MG, + OPERATOR_ID_64700_ORANGE_REUNION_RE, + OPERATOR_ID_64710_SFR_REUNION_RE, + OPERATOR_ID_64801_NET_ONE_ZW, + OPERATOR_ID_64803_TELECEL_ZW, + OPERATOR_ID_64804_ECONET_ZW, + OPERATOR_ID_64901_MTC_NA, + OPERATOR_ID_65001_CALLPOINT_90_MW, + OPERATOR_ID_65010_CELTEL_MW, + OPERATOR_ID_65101_VODACOM_LS, + OPERATOR_ID_65201_MASCOM_BW, + OPERATOR_ID_65202_VISTA_BW, + OPERATOR_ID_65310_SWAZIMTN_SZ, + OPERATOR_ID_65501_VODACOM_ZA, + OPERATOR_ID_65507_CELL_C_PTY_LTD_ZA, + OPERATOR_ID_65510_MTN_ZA, + OPERATOR_ID_70601_PERSONAL_SV, + OPERATOR_ID_70602_DIGICEL_SV, + OPERATOR_ID_71610_TIM_PE, + OPERATOR_ID_72207_UNIFON_AR, + OPERATOR_ID_72234_TELECOM_PERSONAL_AR, + OPERATOR_ID_72235_PORT_HABLE_AR, + OPERATOR_ID_72402_TIM_BRASIL_BR, + OPERATOR_ID_72403_TIM_BRASIL_BR, + OPERATOR_ID_72404_TIM_BRASIL_BR, + OPERATOR_ID_72405_CLARO_BR, + OPERATOR_ID_72416_BRTCEL_BR, + OPERATOR_ID_73001_ENTEL_PCS_CL, + OPERATOR_ID_73010_ENTEL_PCS_CL, + OPERATOR_ID_73401_INFONET_VE, + OPERATOR_ID_73402_DIGITEL_VE, + OPERATOR_ID_73601_NUEVATEL_BO, + OPERATOR_ID_73602_ENTEL_BO, + OPERATOR_ID_74401_VOX_PY, + OPERATOR_ID_74402_PY_02_PY, + OPERATOR_ID_74601_ICMS_SR, + OPERATOR_ID_74605_THURAYA_UNKNOW, + OPERATOR_ID_NUMS, + +}; + + +static struct operator_id_name area_operator_id_name[OPERATOR_ID_NUMS] = { + {DEVICE_TYPE_OPERATOR, 20000, "no", "no"}, + {DEVICE_TYPE_OPERATOR, 20201, "Cosmote", "GR"}, + {DEVICE_TYPE_OPERATOR, 20205, "Vodafone GR", "GR"}, + {DEVICE_TYPE_OPERATOR, 20210, "TELESTET", "GR"}, + {DEVICE_TYPE_OPERATOR, 20404, "Vodafone NL", "NL"}, + {DEVICE_TYPE_OPERATOR, 20408, "KPN", "NL"}, + {DEVICE_TYPE_OPERATOR, 20412, "O2 - NL", "NL"}, + {DEVICE_TYPE_OPERATOR, 20416, "Ben", "NL"}, + {DEVICE_TYPE_OPERATOR, 20420, "dutchtone", "NL"}, + {DEVICE_TYPE_OPERATOR, 20601, "Proximus", "BE"}, + {DEVICE_TYPE_OPERATOR, 20610, "Mobistar", "BE"}, + {DEVICE_TYPE_OPERATOR, 20620, "Orange", "BE"}, + {DEVICE_TYPE_OPERATOR, 20801, "Orange", "FR"}, + {DEVICE_TYPE_OPERATOR, 20810, "SFR", "FR"}, + {DEVICE_TYPE_OPERATOR, 20820, "BOUYGTEL", "FR"}, + {DEVICE_TYPE_OPERATOR, 21303, "Mobiland", "AD"}, + {DEVICE_TYPE_OPERATOR, 21401, "Vodafone E", "ES"}, + {DEVICE_TYPE_OPERATOR, 21402, "MoviStar", "ES"}, + {DEVICE_TYPE_OPERATOR, 21403, "AMENA", "ES"}, + {DEVICE_TYPE_OPERATOR, 21404, "Xfera", "ES"}, + {DEVICE_TYPE_OPERATOR, 21407, "MoviStar", "ES"}, + {DEVICE_TYPE_OPERATOR, 21601, "Pannon GSM", "HU"}, + {DEVICE_TYPE_OPERATOR, 21630, "Westel", "HU"}, + {DEVICE_TYPE_OPERATOR, 21670, "Vodafone", "HU"}, + {DEVICE_TYPE_OPERATOR, 21803, "ERONET", "BA"}, + {DEVICE_TYPE_OPERATOR, 21805, "Mobilna Srpska", "BA"}, + {DEVICE_TYPE_OPERATOR, 21890, "GSM BiH", "BA"}, + {DEVICE_TYPE_OPERATOR, 21901, "CRONET", "HR"}, + {DEVICE_TYPE_OPERATOR, 21910, "VIP", "HR"}, + {DEVICE_TYPE_OPERATOR, 22001, "MOBTEL", "YU"}, + {DEVICE_TYPE_OPERATOR, 22002, "ProMonte", "YU"}, + {DEVICE_TYPE_OPERATOR, 22003, "Telekom Srbija", "YU"}, + {DEVICE_TYPE_OPERATOR, 22004, "MONET", "YU"}, + {DEVICE_TYPE_OPERATOR, 22201, "TIM", "IT"}, + {DEVICE_TYPE_OPERATOR, 22210, "Vodafone IT", "IT"}, + {DEVICE_TYPE_OPERATOR, 22288, "WIND", "IT"}, + {DEVICE_TYPE_OPERATOR, 22298, "Blu SpA", "IT"}, + {DEVICE_TYPE_OPERATOR, 22601, "CONNEX", "RO"}, + {DEVICE_TYPE_OPERATOR, 22603, "Cosmorom", "RO"}, + {DEVICE_TYPE_OPERATOR, 22610, "dialog", "RO"}, + {DEVICE_TYPE_OPERATOR, 22801, "Swiss GSM", "CH"}, + {DEVICE_TYPE_OPERATOR, 22802, "sunrise", "CH"}, + {DEVICE_TYPE_OPERATOR, 22803, "Orange", "CH"}, + {DEVICE_TYPE_OPERATOR, 23001, "PAEGAS", "CZ"}, + {DEVICE_TYPE_OPERATOR, 23002, "EUROTEL", "CZ"}, + {DEVICE_TYPE_OPERATOR, 23003, "OSKAR", "CZ"}, + {DEVICE_TYPE_OPERATOR, 23101, "GLOBTEL", "SK"}, + {DEVICE_TYPE_OPERATOR, 23102, "EUROTEL", "SK"}, + {DEVICE_TYPE_OPERATOR, 23201, "A1", "AT"}, + {DEVICE_TYPE_OPERATOR, 23203, "T-Mobile", "AT"}, + {DEVICE_TYPE_OPERATOR, 23205, "ONE", "AT"}, + {DEVICE_TYPE_OPERATOR, 23207, "tele.ring", "AT"}, + {DEVICE_TYPE_OPERATOR, 23410, "O2 - UK", "GB"}, + {DEVICE_TYPE_OPERATOR, 23415, "Vodafone", "GB"}, + {DEVICE_TYPE_OPERATOR, 23430, "T-Mobile UK", "GB"}, + {DEVICE_TYPE_OPERATOR, 23431, "T-Mobile UK", "GB"}, + {DEVICE_TYPE_OPERATOR, 23432, "T-Mobile UK", "GB"}, + {DEVICE_TYPE_OPERATOR, 23433, "Orange", "GB"}, + {DEVICE_TYPE_OPERATOR, 23450, "JT GSM", "GB"}, + {DEVICE_TYPE_OPERATOR, 23455, "GUERNSEY TEL", "GB"}, + {DEVICE_TYPE_OPERATOR, 23458, "MANX", "GB"}, + {DEVICE_TYPE_OPERATOR, 23801, "TDK-MOBIL", "DK"}, + {DEVICE_TYPE_OPERATOR, 23802, "SONOFON", "DK"}, + {DEVICE_TYPE_OPERATOR, 23820, "Telia", "DK"}, + {DEVICE_TYPE_OPERATOR, 23830, "Orange", "DK"}, + {DEVICE_TYPE_OPERATOR, 24001, "Telia S", "SE"}, + {DEVICE_TYPE_OPERATOR, 24007, "IQ", "SE"}, + {DEVICE_TYPE_OPERATOR, 24008, "Vodafone", "SE"}, + {DEVICE_TYPE_OPERATOR, 24201, "TELENOR", "NO"}, + {DEVICE_TYPE_OPERATOR, 24202, "NetCom", "NO"}, + {DEVICE_TYPE_OPERATOR, 24403, "Telia", "FI"}, + {DEVICE_TYPE_OPERATOR, 24405, "RADIOLINJA", "FI"}, + {DEVICE_TYPE_OPERATOR, 24409, "FINNET", "FI"}, + {DEVICE_TYPE_OPERATOR, 24412, "2G", "FI"}, + {DEVICE_TYPE_OPERATOR, 24414, "AMT", "FI"}, + {DEVICE_TYPE_OPERATOR, 24491, "SONERA", "FI"}, + {DEVICE_TYPE_OPERATOR, 24601, "OMNITEL", "LT"}, + {DEVICE_TYPE_OPERATOR, 24602, "Bite GSM", "LT"}, + {DEVICE_TYPE_OPERATOR, 24603, "TELE2", "LT"}, + {DEVICE_TYPE_OPERATOR, 24701, "LMT GSM", "LV"}, + {DEVICE_TYPE_OPERATOR, 24702, "BALTCOM", "LV"}, + {DEVICE_TYPE_OPERATOR, 24801, "EMT GSM", "EE"}, + {DEVICE_TYPE_OPERATOR, 24802, "RLE", "EE"}, + {DEVICE_TYPE_OPERATOR, 24803, "Q GSM", "EE"}, + {DEVICE_TYPE_OPERATOR, 25001, "MTS", "RU"}, + {DEVICE_TYPE_OPERATOR, 25002, "NorthWest GSM", "RU"}, + {DEVICE_TYPE_OPERATOR, 25003, "NCC", "RU"}, + {DEVICE_TYPE_OPERATOR, 25005, "SCS", "RU"}, + {DEVICE_TYPE_OPERATOR, 25007, "SMARTS", "RU"}, + {DEVICE_TYPE_OPERATOR, 25010, "DTC", "RU"}, + {DEVICE_TYPE_OPERATOR, 25011, "Orensot", "RU"}, + {DEVICE_TYPE_OPERATOR, 25012, "Far East", "RU"}, + {DEVICE_TYPE_OPERATOR, 25013, "Kuban GSM", "RU"}, + {DEVICE_TYPE_OPERATOR, 25016, "NTC", "RU"}, + {DEVICE_TYPE_OPERATOR, 25017, "Ermak RMS", "RU"}, + {DEVICE_TYPE_OPERATOR, 25028, "EXTEL", "RU"}, + {DEVICE_TYPE_OPERATOR, 25039, "Uraltel", "RU"}, + {DEVICE_TYPE_OPERATOR, 25044, "NC-GSM", "RU"}, + {DEVICE_TYPE_OPERATOR, 25091, "Sonic Duo", "RU"}, + {DEVICE_TYPE_OPERATOR, 25092, "Primtel", "RU"}, + {DEVICE_TYPE_OPERATOR, 25093, "JSC Telecom XXI", "RU"}, + {DEVICE_TYPE_OPERATOR, 25099, "Bee Line", "RU"}, + {DEVICE_TYPE_OPERATOR, 25501, "UMC", "UA"}, + {DEVICE_TYPE_OPERATOR, 25502, "WellCOM", "UA"}, + {DEVICE_TYPE_OPERATOR, 25503, "Kyivstar", "UA"}, + {DEVICE_TYPE_OPERATOR, 25505, "Golden Telecom", "UA"}, + {DEVICE_TYPE_OPERATOR, 25701, "VELCOM", "BY"}, + {DEVICE_TYPE_OPERATOR, 25901, "VOXTEL", "MD"}, + {DEVICE_TYPE_OPERATOR, 25902, "MOLDCELL", "MD"}, + {DEVICE_TYPE_OPERATOR, 26001, "Plus GSM", "PL"}, + {DEVICE_TYPE_OPERATOR, 26002, "Era GSM", "PL"}, + {DEVICE_TYPE_OPERATOR, 26003, "IDEA", "PL"}, + {DEVICE_TYPE_OPERATOR, 26201, "T-Mobile", "DE"}, + {DEVICE_TYPE_OPERATOR, 26202, "Vodafone D2", "DE"}, + {DEVICE_TYPE_OPERATOR, 26203, "E-Plus", "DE"}, + {DEVICE_TYPE_OPERATOR, 26207, "O2 - DE", "DE"}, + {DEVICE_TYPE_OPERATOR, 26213, "Mobilcom", "DE"}, + {DEVICE_TYPE_OPERATOR, 26601, "GIBTEL", "GI"}, + {DEVICE_TYPE_OPERATOR, 26801, "Vodafone", "PT"}, + {DEVICE_TYPE_OPERATOR, 26803, "OPTIMUS", "PT"}, + {DEVICE_TYPE_OPERATOR, 26806, "TMN", "PT"}, + {DEVICE_TYPE_OPERATOR, 27001, "LUXGSM", "LU"}, + {DEVICE_TYPE_OPERATOR, 27077, "TANGO", "LU"}, + {DEVICE_TYPE_OPERATOR, 27201, "Vodafone IRL", "IE"}, + {DEVICE_TYPE_OPERATOR, 27202, "O2 - IRL", "IE"}, + {DEVICE_TYPE_OPERATOR, 27203, "METEOR", "IE"}, + {DEVICE_TYPE_OPERATOR, 27401, "SIMINN", "IS"}, + {DEVICE_TYPE_OPERATOR, 27402, "TAL", "IS"}, + {DEVICE_TYPE_OPERATOR, 27404, "Viking", "IS"}, + {DEVICE_TYPE_OPERATOR, 27601, "AMC", "AL"}, + {DEVICE_TYPE_OPERATOR, 27602, "Vodafone", "AL"}, + {DEVICE_TYPE_OPERATOR, 27801, "Vodafone Malta", "MT"}, + {DEVICE_TYPE_OPERATOR, 27821, "go mobile", "MT"}, + {DEVICE_TYPE_OPERATOR, 28001, "CYTAGSM", "CY"}, + {DEVICE_TYPE_OPERATOR, 28201, "GEOCELL", "GE"}, + {DEVICE_TYPE_OPERATOR, 28202, "Magti GSM", "GE"}, + {DEVICE_TYPE_OPERATOR, 28203, "GEO 03", "GE"}, + {DEVICE_TYPE_OPERATOR, 28301, "ARMGSM", "AM"}, + {DEVICE_TYPE_OPERATOR, 28401, "M-TEL GSM", "BG"}, + {DEVICE_TYPE_OPERATOR, 28601, "TURKCELL", "TR"}, + {DEVICE_TYPE_OPERATOR, 28602, "TELSIM", "TR"}, + {DEVICE_TYPE_OPERATOR, 28603, "ARIA", "TR"}, + {DEVICE_TYPE_OPERATOR, 28604, "AYCELL", "TR"}, + {DEVICE_TYPE_OPERATOR, 28801, "FT GSM", "FO"}, + {DEVICE_TYPE_OPERATOR, 29001, "TELE Greenland", "GR"}, + {DEVICE_TYPE_OPERATOR, 29340, "SI.MOBIL", "SI"}, + {DEVICE_TYPE_OPERATOR, 29341, "MOBITEL", "SI"}, + {DEVICE_TYPE_OPERATOR, 29401, "MOBIMAK", "MK"}, + {DEVICE_TYPE_OPERATOR, 29501, "TELECOM", "LI"}, + {DEVICE_TYPE_OPERATOR, 29502, "MONTEL", "LI"}, + {DEVICE_TYPE_OPERATOR, 29505, "FL1", "LI"}, + {DEVICE_TYPE_OPERATOR, 29577, "LI TANGO", "LI"}, + {DEVICE_TYPE_OPERATOR, 30237, "Microcell", "CA"}, + {DEVICE_TYPE_OPERATOR, 30272, "Rogers AT&T", "CA"}, + {DEVICE_TYPE_OPERATOR, 31001, "Cellnet", "US"}, + {DEVICE_TYPE_OPERATOR, 31011, "Wireless 2000", "US"}, + {DEVICE_TYPE_OPERATOR, 31015, "Cingular", "US"}, + {DEVICE_TYPE_OPERATOR, 31016, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31017, "Cingular", "US"}, + {DEVICE_TYPE_OPERATOR, 31018, "Cingular", "US"}, + {DEVICE_TYPE_OPERATOR, 31020, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31021, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31022, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31023, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31024, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31025, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31026, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31027, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31031, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31034, "WestLink", "US"}, + {DEVICE_TYPE_OPERATOR, 31035, "Carolina", "US"}, + {DEVICE_TYPE_OPERATOR, 31038, "AT&T Wireless", "US"}, + {DEVICE_TYPE_OPERATOR, 31041, "Cingular", "US"}, + {DEVICE_TYPE_OPERATOR, 31046, "TMP Corp", "US"}, + {DEVICE_TYPE_OPERATOR, 31058, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31061, "Epic Touch", "US"}, + {DEVICE_TYPE_OPERATOR, 31063, "AmeriLink", "US"}, + {DEVICE_TYPE_OPERATOR, 31064, "Einstein PCS", "US"}, + {DEVICE_TYPE_OPERATOR, 31066, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31067, "Wireless 2000", "US"}, + {DEVICE_TYPE_OPERATOR, 31068, "NPI Wireless", "US"}, + {DEVICE_TYPE_OPERATOR, 31069, "Conestoga", "US"}, + {DEVICE_TYPE_OPERATOR, 31074, "Telemetrix", "US"}, + {DEVICE_TYPE_OPERATOR, 31076, "PTSI", "US"}, + {DEVICE_TYPE_OPERATOR, 31077, "Iowa Wireless", "US"}, + {DEVICE_TYPE_OPERATOR, 31078, "Airlink PCS", "US"}, + {DEVICE_TYPE_OPERATOR, 31079, "PinPoint", "US"}, + {DEVICE_TYPE_OPERATOR, 31080, "T-Mobile", "US"}, + {DEVICE_TYPE_OPERATOR, 31098, "AWS", "US"}, + {DEVICE_TYPE_OPERATOR, 31114, "Sprocket", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 31601, "Nextel", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 33805, "Digicel", "JM"}, + {DEVICE_TYPE_OPERATOR, 34001, "Orange ", "FW"}, + {DEVICE_TYPE_OPERATOR, 34020, "Bouygues", "FW"}, + {DEVICE_TYPE_OPERATOR, 34430, "APUA PCS", "AG"}, + {DEVICE_TYPE_OPERATOR, 35001, "Telecom", "BM"}, + {DEVICE_TYPE_OPERATOR, 36251, "Telcell GSM", "AN"}, + {DEVICE_TYPE_OPERATOR, 36801, "C_Com", "CU"}, + {DEVICE_TYPE_OPERATOR, 37001, "Orange", "DO"}, + {DEVICE_TYPE_OPERATOR, 40001, "AZERCELL GSM", "AZ"}, + {DEVICE_TYPE_OPERATOR, 40002, "BAKCELL GSM 2000", "AZ"}, + {DEVICE_TYPE_OPERATOR, 40101, "K-MOBILE", "KZ"}, + {DEVICE_TYPE_OPERATOR, 40102, "K'CELL", "KZ"}, + {DEVICE_TYPE_OPERATOR, 40401, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40402, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40403, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40404, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40405, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40407, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40409, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40410, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40411, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40412, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40413, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40414, "Spice", "IN"}, + {DEVICE_TYPE_OPERATOR, 40415, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40416, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40418, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40419, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40420, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40421, "BPL Mobile", "IN"}, + {DEVICE_TYPE_OPERATOR, 40422, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40424, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40427, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40429, "Aircel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40430, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40431, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40434, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40436, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40437, "Aircel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40438, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40440, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40441, "RPG", "IN"}, + {DEVICE_TYPE_OPERATOR, 40443, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40444, "Spice", "IN"}, + {DEVICE_TYPE_OPERATOR, 40445, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40446, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40449, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40450, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40451, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40452, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40453, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40454, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40455, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40456, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40457, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40458, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40459, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40460, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40462, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40464, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40466, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40467, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40468, "DOLPHIN", "IN"}, + {DEVICE_TYPE_OPERATOR, 40469, "MTNL", "IN"}, + {DEVICE_TYPE_OPERATOR, 40470, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40471, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40472, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40473, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40474, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40475, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40476, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40477, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40478, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40479, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40480, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40481, "Cellone", "IN"}, + {DEVICE_TYPE_OPERATOR, 40482, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40483, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40484, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40485, "Reliance", "IN"}, + {DEVICE_TYPE_OPERATOR, 40486, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40487, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40488, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40489, "IDEA", "IN"}, + {DEVICE_TYPE_OPERATOR, 40490, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40492, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40493, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40494, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40495, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40496, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40497, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40498, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40551, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40552, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40553, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40554, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40555, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40556, "Airtel", "IN"}, + {DEVICE_TYPE_OPERATOR, 40566, "Hutch", "IN"}, + {DEVICE_TYPE_OPERATOR, 40567, "Hutch", "IN" }, + {DEVICE_TYPE_OPERATOR, 41001, "Mobilink", "PK"}, + {DEVICE_TYPE_OPERATOR, 41302, "DIALOG", "LK"}, + {DEVICE_TYPE_OPERATOR, 41303, "CELLTEL", "LK"}, + {DEVICE_TYPE_OPERATOR, 41401, "MM 900", "MM"}, + {DEVICE_TYPE_OPERATOR, 41501, "Cellis", "LB"}, + {DEVICE_TYPE_OPERATOR, 41503, "LibanCell", "LB"}, + {DEVICE_TYPE_OPERATOR, 41601, "Fastlink", "JO"}, + {DEVICE_TYPE_OPERATOR, 41677, "MobileCom", "JO"}, + {DEVICE_TYPE_OPERATOR, 41702, "Spacetel", "SY"}, + {DEVICE_TYPE_OPERATOR, 41709, "MOBILE SYRIA", "SY"}, + {DEVICE_TYPE_OPERATOR, 41902, "MTCNet", "KW"}, + {DEVICE_TYPE_OPERATOR, 41903, "WATANIYA", "KW"}, + {DEVICE_TYPE_OPERATOR, 42001, "Al-Jawal", "SA"}, + {DEVICE_TYPE_OPERATOR, 42007, "EAE", "SA"}, + {DEVICE_TYPE_OPERATOR, 42102, "Spacetel", "YE"}, + {DEVICE_TYPE_OPERATOR, 42202, "OMAN MOBILE", "OM"}, + {DEVICE_TYPE_OPERATOR, 42402, "ETISALAT", "AE"}, + {DEVICE_TYPE_OPERATOR, 42501, "Orange", "IL"}, + {DEVICE_TYPE_OPERATOR, 42505, "JAWWAL", "IL"}, + {DEVICE_TYPE_OPERATOR, 42601, "MOBILE PLUS", "BH"}, + {DEVICE_TYPE_OPERATOR, 42701, "QATARNET", "QA"}, + {DEVICE_TYPE_OPERATOR, 42899, "MobiCom", "MN"}, + {DEVICE_TYPE_OPERATOR, 42901, "NTC", "NP"}, + {DEVICE_TYPE_OPERATOR, 43211, "TCI", "IR"}, + {DEVICE_TYPE_OPERATOR, 43214, "KISH", "IR"}, + {DEVICE_TYPE_OPERATOR, 43401, "Buztel", "UZ"}, + {DEVICE_TYPE_OPERATOR, 43402, "Uzmacom", "UZ"}, + {DEVICE_TYPE_OPERATOR, 43404, "UZB DAEWOO-GSM", "UZ"}, + {DEVICE_TYPE_OPERATOR, 43405, "Coscom", "UZ"}, + {DEVICE_TYPE_OPERATOR, 43701, "BITEL", "KG"}, + {DEVICE_TYPE_OPERATOR, 43801, "BCTI", "TM"}, + {DEVICE_TYPE_OPERATOR, 45201, "MOBIFONE", "VN"}, + {DEVICE_TYPE_OPERATOR, 45202, "VINAFONE", "VN"}, + {DEVICE_TYPE_OPERATOR, 45400, "CSL", "HK"}, + {DEVICE_TYPE_OPERATOR, 45401, "NEW WORLD", "HK"}, + {DEVICE_TYPE_OPERATOR, 45402, "CSL", "HK"}, + {DEVICE_TYPE_OPERATOR, 45404, "Orange", "HK"}, + {DEVICE_TYPE_OPERATOR, 45406, "SMC", "HK"}, + {DEVICE_TYPE_OPERATOR, 45410, "NEW WORLD", "HK"}, + {DEVICE_TYPE_OPERATOR, 45412, "PEOPLES", "HK"}, + {DEVICE_TYPE_OPERATOR, 45416, "SUNDAY", "HK"}, + {DEVICE_TYPE_OPERATOR, 45418, "HK TELECOM", "HK"}, + {DEVICE_TYPE_OPERATOR, 45500, "SmarTone", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 45501, "CTMGSM", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 45503, "HT Macau", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 45601, "MobiTel", "KH"}, + {DEVICE_TYPE_OPERATOR, 45602, "SAMART-GSM", "KH"}, + {DEVICE_TYPE_OPERATOR, 45701, "LAO GSM", "LA"}, + {DEVICE_TYPE_OPERATOR, 46000, "CHINA MOBILE", "CN"}, + {DEVICE_TYPE_OPERATOR, 46001, "CHN-CUGSM", "CN"}, + {DEVICE_TYPE_OPERATOR, 46002, "CHINA MOBILE", "CN"}, + {DEVICE_TYPE_OPERATOR, 46601, "Far EasTone", "TW"}, + {DEVICE_TYPE_OPERATOR, 46606, "TUNTEX", "TW"}, + {DEVICE_TYPE_OPERATOR, 46668, "ACeS", "TW"}, + {DEVICE_TYPE_OPERATOR, 46688, "KGT", "TW"}, + {DEVICE_TYPE_OPERATOR, 46692, "Chunghwa", "TW"}, + {DEVICE_TYPE_OPERATOR, 46693, "MobiTai", "TW"}, + {DEVICE_TYPE_OPERATOR, 46697, "TWN GSM", "TW"}, + {DEVICE_TYPE_OPERATOR, 46699, "TransAsia", "TW"}, + {DEVICE_TYPE_OPERATOR, 47001, "GrameemPhone", "BD"}, + {DEVICE_TYPE_OPERATOR, 47002, "AKTEL", "BD"}, + {DEVICE_TYPE_OPERATOR, 47003, "ShebaWorld", "BD"}, + {DEVICE_TYPE_OPERATOR, 47019, "Mobile 2000", "BD"}, + {DEVICE_TYPE_OPERATOR, 47201, "DHIMOBILE", "MV"}, + {DEVICE_TYPE_OPERATOR, 50212, "Maxis Mobile", "MY"}, + {DEVICE_TYPE_OPERATOR, 50213, "TM Touch", "MY"}, + {DEVICE_TYPE_OPERATOR, 50216, "DiGi", "MY"}, + {DEVICE_TYPE_OPERATOR, 50217, "ADAM", "MY"}, + {DEVICE_TYPE_OPERATOR, 50219, "CELCOM", "MY"}, + {DEVICE_TYPE_OPERATOR, 50501, "MobileNet", "AU"}, + {DEVICE_TYPE_OPERATOR, 50502, "OPTUS", "AU"}, + {DEVICE_TYPE_OPERATOR, 50503, "Vodafone", "AU"}, + {DEVICE_TYPE_OPERATOR, 50508, "One.Tel", "AU"}, + {DEVICE_TYPE_OPERATOR, 51000, "ACeS", "ID"}, + {DEVICE_TYPE_OPERATOR, 51001, "SATELINDOCEL", "ID"}, + {DEVICE_TYPE_OPERATOR, 51008, "LIPPO TEL", "ID"}, + {DEVICE_TYPE_OPERATOR, 51010, "TELKOMSEL", "ID"}, + {DEVICE_TYPE_OPERATOR, 51011, "GSM-XL", "ID"}, + {DEVICE_TYPE_OPERATOR, 51021, "INDOSAT", "ID"}, + {DEVICE_TYPE_OPERATOR, 51501, "ISLACOM", "PH"}, + {DEVICE_TYPE_OPERATOR, 51502, "Globe", "PH"}, + {DEVICE_TYPE_OPERATOR, 51503, "SMART", "PH"}, + {DEVICE_TYPE_OPERATOR, 51505, "Digitel", "PH"}, + {DEVICE_TYPE_OPERATOR, 51511, "ACeS", "PH"}, + {DEVICE_TYPE_OPERATOR, 52001, "AIS GSM", "TH"}, + {DEVICE_TYPE_OPERATOR, 52015, "ACT Mobile", "TH"}, + {DEVICE_TYPE_OPERATOR, 52018, "WP-1800", "TH"}, + {DEVICE_TYPE_OPERATOR, 52020, "ACeS", "TH"}, + {DEVICE_TYPE_OPERATOR, 52023, "HELLO", "TH"}, + {DEVICE_TYPE_OPERATOR, 52099, "Orange", "TH"}, + {DEVICE_TYPE_OPERATOR, 52501, "ST-GSM-SGP", "SG"}, + {DEVICE_TYPE_OPERATOR, 52502, "ST-GSM1800-SGP", "SG"}, + {DEVICE_TYPE_OPERATOR, 52503, "M1-GSM-SGP", "SG"}, + {DEVICE_TYPE_OPERATOR, 52504, "SGP-M1-3GSM", "SG"}, + {DEVICE_TYPE_OPERATOR, 52505, "STARHUB-SGP", "SG"}, + {DEVICE_TYPE_OPERATOR, 52811, "BRU TSTCom", "BN"}, + {DEVICE_TYPE_OPERATOR, 53001, "Vodafone", "NZ"}, + {DEVICE_TYPE_OPERATOR, 53901, "Tonga Comm.", "TO"}, + {DEVICE_TYPE_OPERATOR, 54100, "ACeS", "VU"}, + {DEVICE_TYPE_OPERATOR, 54101, "SMILE", "VU"}, + {DEVICE_TYPE_OPERATOR, 54201, "Vodafone", "FJ"}, + {DEVICE_TYPE_OPERATOR, 54411, "Blue Sky", "AS"}, + {DEVICE_TYPE_OPERATOR, 54601, "MOBILIS", "NC"}, + {DEVICE_TYPE_OPERATOR, 54720, "VINI", "PF"}, + {DEVICE_TYPE_OPERATOR, 55001, "FSM", "FM"}, + {DEVICE_TYPE_OPERATOR, 60201, "MobiNiL", "EG"}, + {DEVICE_TYPE_OPERATOR, 60202, "CLICK GSM", "EG"}, + {DEVICE_TYPE_OPERATOR, 60301, "AMN", "DZ"}, + {DEVICE_TYPE_OPERATOR, 60400, "Meditel", "MA"}, + {DEVICE_TYPE_OPERATOR, 60401, "IAM", "MA"}, + {DEVICE_TYPE_OPERATOR, 60502, "TUNICELL", "TN"}, + {DEVICE_TYPE_OPERATOR, 60801, "ALIZE", "SN"}, + {DEVICE_TYPE_OPERATOR, 60802, "SENTEL", "SN"}, + {DEVICE_TYPE_OPERATOR, 61001, "MALITEL", "ML"}, + {DEVICE_TYPE_OPERATOR, 61101, "MOBILIS", "GN"}, + {DEVICE_TYPE_OPERATOR, 61102, "LAGUI", "GN"}, + {DEVICE_TYPE_OPERATOR, 61201, "CORA", "CI"}, + {DEVICE_TYPE_OPERATOR, 61203, "Ivoiris", "CI"}, + {DEVICE_TYPE_OPERATOR, 61205, "TELECEL", "CI"}, + {DEVICE_TYPE_OPERATOR, 61302, "CELTEL", "BF"}, + {DEVICE_TYPE_OPERATOR, 61402, "CELTEL", "NE"}, + {DEVICE_TYPE_OPERATOR, 61501, "TOGOCEL", "TG"}, + {DEVICE_TYPE_OPERATOR, 61601, "LIBERCOM", "BJ"}, + {DEVICE_TYPE_OPERATOR, 61602, "Telecel Benin", "BJ"}, + {DEVICE_TYPE_OPERATOR, 61603, "BENINCELL", "BJ"}, + {DEVICE_TYPE_OPERATOR, 61701, "CELLPLUS", "MU"}, + {DEVICE_TYPE_OPERATOR, 61710, "EMTEL", "MU"}, + {DEVICE_TYPE_OPERATOR, 61801, "Omega", "LR"}, + {DEVICE_TYPE_OPERATOR, 62001, "SPACEFON", "GH"}, + {DEVICE_TYPE_OPERATOR, 62002, "ONEtouch", "GH"}, + {DEVICE_TYPE_OPERATOR, 62003, "MOBITEL", "GH"}, + {DEVICE_TYPE_OPERATOR, 62100, "MTN", "NG"}, + {DEVICE_TYPE_OPERATOR, 62120, "ECONET", "NG"}, + {DEVICE_TYPE_OPERATOR, 62130, "MTN", "NG"}, + {DEVICE_TYPE_OPERATOR, 62140, "NITEL GSM", "NG"}, + {DEVICE_TYPE_OPERATOR, 62201, "CELTEL", "TD"}, + {DEVICE_TYPE_OPERATOR, 62202, "LIBERTIS", "TD"}, + {DEVICE_TYPE_OPERATOR, 62401, "MTN-CAM", "CM"}, + {DEVICE_TYPE_OPERATOR, 62402, "MOBILIS", "CM"}, + {DEVICE_TYPE_OPERATOR, 62501, "CPV MOVEL", "CV"}, + {DEVICE_TYPE_OPERATOR, 62801, "LIBERTIS", "GA"}, + {DEVICE_TYPE_OPERATOR, 62802, "GO Celtel", "GA"}, + {DEVICE_TYPE_OPERATOR, 62803, "CELTEL", "GA"}, + {DEVICE_TYPE_OPERATOR, 62901, "CELTEL", "CG"}, + {DEVICE_TYPE_OPERATOR, 62910, "LIBERTIS", "CG"}, + {DEVICE_TYPE_OPERATOR, 63001, "CELLNET", "CD"}, + {DEVICE_TYPE_OPERATOR, 63002, "CELTEL", "CD"}, + {DEVICE_TYPE_OPERATOR, 63004, "CELLCO", "CD"}, + {DEVICE_TYPE_OPERATOR, 63089, "OASIS", "CD"}, + {DEVICE_TYPE_OPERATOR, 63301, "SEYCEL", "SC"}, + {DEVICE_TYPE_OPERATOR, 63310, "AIRTEL", "SC"}, + {DEVICE_TYPE_OPERATOR, 63401, "MobiTel", "MZ"}, + {DEVICE_TYPE_OPERATOR, 63510, "Rwandacell", "RW"}, + {DEVICE_TYPE_OPERATOR, 63601, "ETMTN", "ET"}, + {DEVICE_TYPE_OPERATOR, 63701, "BARAKAAT", "SO"}, + {DEVICE_TYPE_OPERATOR, 63902, "Safaricom", "KE"}, + {DEVICE_TYPE_OPERATOR, 63903, "KENCELL", "KE"}, + {DEVICE_TYPE_OPERATOR, 64001, "TRITEL", "TZ"}, + {DEVICE_TYPE_OPERATOR, 64002, "MobiTel", "TZ"}, + {DEVICE_TYPE_OPERATOR, 64003, "ZANTEL", "TZ"}, + {DEVICE_TYPE_OPERATOR, 64004, "Vodacom", "TZ"}, + {DEVICE_TYPE_OPERATOR, 64005, "CELTEL", "TZ"}, + {DEVICE_TYPE_OPERATOR, 64101, "CelTel", "UG"}, + {DEVICE_TYPE_OPERATOR, 64110, "MTN-UGANDA", "UG"}, + {DEVICE_TYPE_OPERATOR, 64111, "UTL TELECEL", "UG"}, + {DEVICE_TYPE_OPERATOR, 64201, "Spacetel", "BI"}, + {DEVICE_TYPE_OPERATOR, 64202, "SAFARIS", "BI"}, + {DEVICE_TYPE_OPERATOR, 64301, "mCel", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 64501, "ZAMCELL", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 64502, "TELECEL", "UNKNOW"}, + {DEVICE_TYPE_OPERATOR, 64601, "Madacom", "MG"}, + {DEVICE_TYPE_OPERATOR, 64602, "ANTARIS", "MG"}, + {DEVICE_TYPE_OPERATOR, 64700, "Orange Reunion", "RE"}, + {DEVICE_TYPE_OPERATOR, 64710, "SFR Reunion", "RE"}, + {DEVICE_TYPE_OPERATOR, 64801, "NET*ONE", "ZW"}, + {DEVICE_TYPE_OPERATOR, 64803, "TELECEL", "ZW"}, + {DEVICE_TYPE_OPERATOR, 64804, "ECONET", "ZW"}, + {DEVICE_TYPE_OPERATOR, 64901, "MTC", "NA"}, + {DEVICE_TYPE_OPERATOR, 65001, "CALLPOINT 90", "MW"}, + {DEVICE_TYPE_OPERATOR, 65010, "CelTel", "MW"}, + {DEVICE_TYPE_OPERATOR, 65101, "Vodacom", "LS"}, + {DEVICE_TYPE_OPERATOR, 65201, "MASCOM", "BW"}, + {DEVICE_TYPE_OPERATOR, 65202, "VISTA", "BW"}, + {DEVICE_TYPE_OPERATOR, 65310, "SwaziMTN", "SZ"}, + {DEVICE_TYPE_OPERATOR, 65501, "Vodacom", "ZA"}, + {DEVICE_TYPE_OPERATOR, 65507, "Cell C (Pty) Ltd", "ZA"}, + {DEVICE_TYPE_OPERATOR, 65510, "MTN", "ZA"}, + {DEVICE_TYPE_OPERATOR, 70601, "PERSONAL", "SV"}, + {DEVICE_TYPE_OPERATOR, 70602, "DIGICEL", "SV"}, + {DEVICE_TYPE_OPERATOR, 71610, "TIM", "PE"}, + {DEVICE_TYPE_OPERATOR, 72207, "UNIFON", "AR"}, + {DEVICE_TYPE_OPERATOR, 72234, "Telecom Personal", "AR"}, + {DEVICE_TYPE_OPERATOR, 72235, "PORT-HABLE", "AR"}, + {DEVICE_TYPE_OPERATOR, 72402, "TIM BRASIL", "BR"}, + {DEVICE_TYPE_OPERATOR, 72403, "TIM BRASIL", "BR"}, + {DEVICE_TYPE_OPERATOR, 72404, "TIM BRASIL", "BR"}, + {DEVICE_TYPE_OPERATOR, 72405, "Claro", "BR"}, + {DEVICE_TYPE_OPERATOR, 72416, "BrTCel", "BR"}, + {DEVICE_TYPE_OPERATOR, 73001, "ENTEL PCS", "CL"}, + {DEVICE_TYPE_OPERATOR, 73010, "ENTEL PCS", "CL"}, + {DEVICE_TYPE_OPERATOR, 73401, "INFONET", "VE"}, + {DEVICE_TYPE_OPERATOR, 73402, "DIGITEL", "VE"}, + {DEVICE_TYPE_OPERATOR, 73601, "NUEVATEL", "BO"}, + {DEVICE_TYPE_OPERATOR, 73602, "ENTEL", "BO"}, + {DEVICE_TYPE_OPERATOR, 74401, "VOX", "PY"}, + {DEVICE_TYPE_OPERATOR, 74402, "PY 02", "PY"}, + {DEVICE_TYPE_OPERATOR, 74601, "ICMS", "SR"}, + {DEVICE_TYPE_OPERATOR, 74605, "Thuraya", "UNKNOW"} //90105 +}; + +static struct reserve_id_name area_reserve_id_name[RESERVE_ID_NUMS] = { + {DEVICE_TYPE_RESERVE, 0, "no", "CN"}, +}; + + +#endif diff --git a/include/linux/board-id.h b/include/linux/board-id.h new file mode 100755 index 000000000000..b121a10dcab7 --- /dev/null +++ b/include/linux/board-id.h @@ -0,0 +1,1435 @@ +#ifndef __BOARD_ID_H +#define __BOARD_ID_H +#include +#include + +enum type_devices{ + DEVICE_TYPE_NULL = 0x0, + + DEVICE_TYPE_SUM = 0x20, + DEVICE_TYPE_AREA = 0x24, // + DEVICE_TYPE_OPERATOR = 0x25, + DEVICE_TYPE_OPERATOR2 = 0x26, + DEVICE_TYPE_RESERVE = 0x27, + DEVICE_TYPE_STATUS = 0x28, + + DEVICE_TYPE_TP = 0x29, //one byte size + DEVICE_TYPE_LCD, + DEVICE_TYPE_KEY, + DEVICE_TYPE_CODEC, + DEVICE_TYPE_WIFI, + DEVICE_TYPE_BT, + DEVICE_TYPE_GPS, + DEVICE_TYPE_FM, + DEVICE_TYPE_MODEM, + DEVICE_TYPE_DDR, + DEVICE_TYPE_FLASH, + DEVICE_TYPE_HDMI, + DEVICE_TYPE_BATTERY, + DEVICE_TYPE_CHARGE, + DEVICE_TYPE_BACKLIGHT, + DEVICE_TYPE_HEADSET, + DEVICE_TYPE_MICPHONE, + DEVICE_TYPE_SPEAKER, + DEVICE_TYPE_VIBRATOR, + DEVICE_TYPE_TV, + DEVICE_TYPE_ECHIP, //30 + DEVICE_TYPE_HUB, + DEVICE_TYPE_TPAD, + + DEVICE_TYPE_PMIC, + DEVICE_TYPE_REGULATOR, + DEVICE_TYPE_RTC, + DEVICE_TYPE_CAMERA_FRONT, + DEVICE_TYPE_CAMERA_BACK, //35 + DEVICE_TYPE_ANGLE, + DEVICE_TYPE_ACCEL, + DEVICE_TYPE_COMPASS, + DEVICE_TYPE_GYRO, + DEVICE_TYPE_LIGHT, + DEVICE_TYPE_PROXIMITY, + DEVICE_TYPE_TEMPERATURE, + DEVICE_TYPE_PRESSURE, + + DEVICE_NUM_TYPES, +}; + + +#if 0 +enum id_language{ + LANGUAGE_ID_NULL = 0, + LANGUAGE_ID_EN,// Ó¢ÎÄ + LANGUAGE_ID_EN_US,// Ó¢ÎÄ (ÃÀ¹ú) + LANGUAGE_ID_AR,// °¢À­²®ÎÄ + LANGUAGE_ID_AR_AE,// °¢À­²®ÎÄ (°¢À­²®ÁªºÏÇõ³¤¹ú) + LANGUAGE_ID_AR_BH,// °¢À­²®ÎÄ (°ÍÁÖ) + LANGUAGE_ID_AR_DZ,// °¢À­²®ÎÄ (°¢¶û¼°ÀûÑÇ) + LANGUAGE_ID_AR_EG,// °¢À­²®ÎÄ (°£¼°) + LANGUAGE_ID_AR_IQ,// °¢À­²®ÎÄ (ÒÁÀ­¿Ë) + LANGUAGE_ID_AR_JO,// °¢À­²®ÎÄ (Ô¼µ©) + LANGUAGE_ID_AR_KW,// °¢À­²®ÎÄ (¿ÆÍþÌØ) + LANGUAGE_ID_AR_LB,// °¢À­²®ÎÄ (Àè°ÍÄÛ) + LANGUAGE_ID_AR_LY,// °¢À­²®ÎÄ (Àû±ÈÑÇ) + LANGUAGE_ID_AR_MA,// °¢À­²®ÎÄ (ĦÂå¸ç) + LANGUAGE_ID_AR_OM,// °¢À­²®ÎÄ (°¢Âü) + LANGUAGE_ID_AR_QA,// °¢À­²®ÎÄ (¿¨Ëþ¶û) + LANGUAGE_ID_AR_SA,// °¢À­²®ÎÄ (ɳÌØ°¢À­²®) + LANGUAGE_ID_AR_SD,// °¢À­²®ÎÄ (ËÕµ¤) + LANGUAGE_ID_AR_SY,// °¢À­²®ÎÄ (ÐðÀûÑÇ) + LANGUAGE_ID_AR_TN,// °¢À­²®ÎÄ (Í»Äá˹) + LANGUAGE_ID_AR_YE,// °¢À­²®ÎÄ (Ò²ÃÅ) + LANGUAGE_ID_BE,// °×¶íÂÞ˹ÎÄ + LANGUAGE_ID_BE_BY,// °×¶íÂÞ˹ÎÄ (°×¶íÂÞ˹) + LANGUAGE_ID_BG,// ±£¼ÓÀûÑÇÎÄ + LANGUAGE_ID_BG_BG,// ±£¼ÓÀûÑÇÎÄ (±£¼ÓÀûÑÇ) + LANGUAGE_ID_CA,// ¼ÓÌ©ÂÞÄáÑÇÎÄ + LANGUAGE_ID_CA_ES,// ¼ÓÌ©ÂÞÄáÑÇÎÄ (Î÷°àÑÀ) + LANGUAGE_ID_CA_ES_EURO,// ¼ÓÌ©ÂÞÄáÑÇÎÄ (Î÷°àÑÀ,EURO) + LANGUAGE_ID_CS,// ½Ý¿ËÎÄ + LANGUAGE_ID_CS_CZ,// ½Ý¿ËÎÄ (½Ý¿Ë¹²ºÍ¹ú) + LANGUAGE_ID_DA,// µ¤ÂóÎÄ + LANGUAGE_ID_DA_DK,// µ¤ÂóÎÄ (µ¤Âó) + LANGUAGE_ID_DE,// µÂÎÄ + LANGUAGE_ID_DE_AT,// µÂÎÄ (°ÂµØÀû) + LANGUAGE_ID_DE_AT_EURO,// µÂÎÄ (°ÂµØÀû,EURO) + LANGUAGE_ID_DE_CH,// µÂÎÄ (ÈðÊ¿) + LANGUAGE_ID_DE_DE,// µÂÎÄ (µÂ¹ú) + LANGUAGE_ID_DE_DE_EURO,// µÂÎÄ (µÂ¹ú,EURO) + LANGUAGE_ID_DE_LU,// µÂÎÄ (¬ɭ±¤) + LANGUAGE_ID_DE_LU_EURO,// µÂÎÄ (¬ɭ±¤,EURO) + LANGUAGE_ID_EL,// Ï£À°ÎÄ + LANGUAGE_ID_EL_GR,// Ï£À°ÎÄ (Ï£À°) + LANGUAGE_ID_EN_AU,// Ó¢ÎÄ (°Ä´óÀûÑÇ) + LANGUAGE_ID_EN_CA,// Ó¢ÎÄ (¼ÓÄôó) + LANGUAGE_ID_EN_GB,// Ó¢ÎÄ (Ó¢¹ú) + LANGUAGE_ID_EN_IE,// Ó¢ÎÄ (°®¶ûÀ¼) + LANGUAGE_ID_EN_IE_EURO,// Ó¢ÎÄ (°®¶ûÀ¼,EURO) + LANGUAGE_ID_EN_NZ,// Ó¢ÎÄ (ÐÂÎ÷À¼) + LANGUAGE_ID_EN_ZA,// Ó¢ÎÄ (ÄÏ·Ç) + LANGUAGE_ID_ES,// Î÷°àÑÀÎÄ + LANGUAGE_ID_ES_BO,// Î÷°àÑÀÎÄ (²£ÀûάÑÇ) + LANGUAGE_ID_ES_AR,// Î÷°àÑÀÎÄ (°¢¸ùÍ¢) + LANGUAGE_ID_ES_CL,// Î÷°àÑÀÎÄ (ÖÇÀû) + LANGUAGE_ID_ES_CO,// Î÷°àÑÀÎÄ (¸çÂ×±ÈÑÇ) + LANGUAGE_ID_ES_CR,// Î÷°àÑÀÎÄ (¸ç˹´ïÀè¼Ó) + LANGUAGE_ID_ES_DO,// Î÷°àÑÀÎÄ (¶àÃ×Äá¼Ó¹²ºÍ¹ú) + LANGUAGE_ID_ES_EC,// Î÷°àÑÀÎÄ (¶ò¹Ï¶à¶û) + LANGUAGE_ID_ES_ES,// Î÷°àÑÀÎÄ (Î÷°àÑÀ) + LANGUAGE_ID_ES_ES_EURO,// Î÷°àÑÀÎÄ (Î÷°àÑÀ,EURO) + LANGUAGE_ID_ES_GT,// Î÷°àÑÀÎÄ (ΣµØÂíÀ­) + LANGUAGE_ID_ES_HN,// Î÷°àÑÀÎÄ (ºé¶¼À­Ë¹) + LANGUAGE_ID_ES_MX,// Î÷°àÑÀÎÄ (Ä«Î÷¸ç) + LANGUAGE_ID_ES_NI,// Î÷°àÑÀÎÄ (Äá¼ÓÀ­¹Ï) + LANGUAGE_ID_ET,// °®É³ÄáÑÇÎÄ + LANGUAGE_ID_ES_PA,// Î÷°àÑÀÎÄ (°ÍÄÃÂí) + LANGUAGE_ID_ES_PE,// Î÷°àÑÀÎÄ (Ãس) + LANGUAGE_ID_ES_PR,// Î÷°àÑÀÎÄ (²¨¶àÀè¸ç) + LANGUAGE_ID_ES_PY,// Î÷°àÑÀÎÄ (°ÍÀ­¹ç) + LANGUAGE_ID_ES_SV,// Î÷°àÑÀÎÄ (Èø¶ûÍ߶à) + LANGUAGE_ID_ES_UY,// Î÷°àÑÀÎÄ (ÎÚÀ­¹ç) + LANGUAGE_ID_ES_VE,// Î÷°àÑÀÎÄ (ίÄÚÈðÀ­) + LANGUAGE_ID_ET_EE,// °®É³ÄáÑÇÎÄ (°®É³ÄáÑÇ) + LANGUAGE_ID_FI,// ·ÒÀ¼ÎÄ + LANGUAGE_ID_FI_FI,// ·ÒÀ¼ÎÄ (·ÒÀ¼) + LANGUAGE_ID_FI_FI_EURO,// ·ÒÀ¼ÎÄ (·ÒÀ¼,EURO) + LANGUAGE_ID_FR,// ·¨ÎÄ + LANGUAGE_ID_FR_BE,// ·¨ÎÄ (±ÈÀûʱ) + LANGUAGE_ID_FR_BE_EURO,// ·¨ÎÄ (±ÈÀûʱ,EURO) + LANGUAGE_ID_FR_CA,// ·¨ÎÄ (¼ÓÄôó) + LANGUAGE_ID_FR_CH,// ·¨ÎÄ (ÈðÊ¿) + LANGUAGE_ID_FR_FR,// ·¨ÎÄ (·¨¹ú) + LANGUAGE_ID_FR_FR_EURO,// ·¨ÎÄ (·¨¹ú,EURO) + LANGUAGE_ID_FR_LU,// ·¨ÎÄ (¬ɭ±¤) + LANGUAGE_ID_FR_LU_EURO,// ·¨ÎÄ (¬ɭ±¤,EURO) + LANGUAGE_ID_HR,// ¿ËÂÞµØÑÇÎÄ + LANGUAGE_ID_HR_HR,// ¿ËÂÞµØÑÇÎÄ (¿ËÂÞµØÑÇ) + LANGUAGE_ID_HU,// ÐÙÑÀÀûÎÄ + LANGUAGE_ID_HU_HU,// ÐÙÑÀÀûÎÄ (ÐÙÑÀÀû) + LANGUAGE_ID_IS,// ±ùµºÎÄ + LANGUAGE_ID_IS_IS,// ±ùµºÎÄ (±ùµº) + LANGUAGE_ID_IT,// Òâ´óÀûÎÄ + LANGUAGE_ID_IT_CH,// Òâ´óÀûÎÄ (ÈðÊ¿) + LANGUAGE_ID_IT_IT,// Òâ´óÀûÎÄ (Òâ´óÀû) + LANGUAGE_ID_IT_IT_EURO,// Òâ´óÀûÎÄ (Òâ´óÀû,EURO) + LANGUAGE_ID_IW,// Ï£²®À´ÎÄ + LANGUAGE_ID_IW_IL,// Ï£²®À´ÎÄ (ÒÔÉ«ÁÐ) + LANGUAGE_ID_JA,// ÈÕÎÄ + LANGUAGE_ID_JA_JP,// ÈÕÎÄ (ÈÕ±¾) + LANGUAGE_ID_KO,// ³¯ÏÊÎÄ + LANGUAGE_ID_KO_KR,// ³¯ÏÊÎÄ (Äϳ¯ÏÊ) + LANGUAGE_ID_LT,// Á¢ÌÕÍðÎÄ + LANGUAGE_ID_LT_LT,// Á¢ÌÕÍðÎÄ (Á¢ÌÕÍð) + LANGUAGE_ID_LV,// À­ÍÐάÑÇÎÄ(ÁÐÍÐ) + LANGUAGE_ID_LV_LV,// À­ÍÐάÑÇÎÄ(ÁÐÍÐ) (À­ÍÑάÑÇ) + LANGUAGE_ID_MK,// ÂíÆä¶ÙÎÄ + LANGUAGE_ID_MK_MK,// ÂíÆä¶ÙÎÄ (ÂíÆä¶ÙÍõ¹ú) + LANGUAGE_ID_NL,// ºÉÀ¼ÎÄ + LANGUAGE_ID_NL_BE,// ºÉÀ¼ÎÄ (±ÈÀûʱ) + LANGUAGE_ID_NL_BE_EURO,// ºÉÀ¼ÎÄ (±ÈÀûʱ,EURO) + LANGUAGE_ID_NL_NL,// ºÉÀ¼ÎÄ (ºÉÀ¼) + LANGUAGE_ID_NL_NL_EURO,// ºÉÀ¼ÎÄ (ºÉÀ¼,EURO) + LANGUAGE_ID_NO,// ŲÍþÎÄ + LANGUAGE_ID_NO_NO,// ŲÍþÎÄ (ŲÍþ) + LANGUAGE_ID_NO_NO_NY,// ŲÍþÎÄ (ŲÍþ,NYNORSK) + LANGUAGE_ID_PL,// ²¨À¼ÎÄ + LANGUAGE_ID_PL_PL,// ²¨À¼ÎÄ (²¨À¼) + LANGUAGE_ID_PT,// ÆÏÌÑÑÀÎÄ + LANGUAGE_ID_PT_BR,// ÆÏÌÑÑÀÎÄ (°ÍÎ÷) + LANGUAGE_ID_PT_PT,// ÆÏÌÑÑÀÎÄ (ÆÏÌÑÑÀ) + LANGUAGE_ID_PT_PT_EURO,// ÆÏÌÑÑÀÎÄ (ÆÏÌÑÑÀ,EURO) + LANGUAGE_ID_RO,// ÂÞÂíÄáÑÇÎÄ + LANGUAGE_ID_RO_RO,// ÂÞÂíÄáÑÇÎÄ (ÂÞÂíÄáÑÇ) + LANGUAGE_ID_RU,// ¶íÎÄ + LANGUAGE_ID_RU_RU,// ¶íÎÄ (¶íÂÞ˹) + LANGUAGE_ID_SH,// Èû²¨Äá˹-¿ËÂÞµØÑÇÎÄ + LANGUAGE_ID_SH_YU,// Èû²¨Äá˹-¿ËÂÞµØÑÇÎÄ (ÄÏ˹À­·ò) + LANGUAGE_ID_SK,// ˹Âå·¥¿ËÎÄ + LANGUAGE_ID_SK_SK,// ˹Âå·¥¿ËÎÄ (˹Âå·¥¿Ë) + LANGUAGE_ID_SL,// ˹ÂåÎÄÄáÑÇÎÄ + LANGUAGE_ID_SL_SI,// ˹ÂåÎÄÄáÑÇÎÄ (˹ÂåÎÄÄáÑÇ) + LANGUAGE_ID_SQ,// °¢¶û°ÍÄáÑÇÎÄ + LANGUAGE_ID_SQ_AL,// °¢¶û°ÍÄáÑÇÎÄ (°¢¶û°ÍÄáÑÇ) + LANGUAGE_ID_SR,// Èû¶ûάÑÇÎÄ + LANGUAGE_ID_SR_YU,// Èû¶ûάÑÇÎÄ (ÄÏ˹À­·ò) + LANGUAGE_ID_SV,// ÈðµäÎÄ + LANGUAGE_ID_SV_SE,// ÈðµäÎÄ (Èðµä) + LANGUAGE_ID_TH,// Ì©ÎÄ + LANGUAGE_ID_TH_TH,// Ì©ÎÄ (Ì©¹ú) + LANGUAGE_ID_TR,// ÍÁ¶úÆäÎÄ + LANGUAGE_ID_TR_TR,// ÍÁ¶úÆäÎÄ (ÍÁ¶úÆä) + LANGUAGE_ID_UK,// ÎÚ¿ËÀ¼ÎÄ + LANGUAGE_ID_UK_UA,// ÎÚ¿ËÀ¼ÎÄ (ÎÚ¿ËÀ¼) + LANGUAGE_ID_ZH,// ÖÐÎÄ + LANGUAGE_ID_ZH_CN,// ÖÐÎÄ (Öйú) + LANGUAGE_ID_ZH_HK,// ÖÐÎÄ (Ïã¸Û) + LANGUAGE_ID_ZH_TW,// ÖÐÎÄ (̨Íå) ¡¡¡¡ + AREA_ID_NUMS, +}; +#endif + + + +enum area_id{ + AREA_ID_NULL, + AREA_ID_ALBANIA, + AREA_ID_ALGERIA, + AREA_ID_ANGOLA, + AREA_ID_ARGENTINA, + AREA_ID_AUSTRALIA, + AREA_ID_AUSTRIA, + AREA_ID_AZERBAIJAN, + AREA_ID_BAHRAIN, + AREA_ID_BANGLADESH, + AREA_ID_BARBADOS, + AREA_ID_BELARUS, + AREA_ID_BELGIUM, + AREA_ID_BOLIVIA, + AREA_ID_BOSNIA_AND_HERZEGOVINA, + AREA_ID_BOTSWANA, + AREA_ID_BRAZIL, + AREA_ID_BULGARIA, + AREA_ID_CANADA, + AREA_ID_CHILE, + AREA_ID_CHINA, + AREA_ID_COLOMBIA, + AREA_ID_COTE_D_IVOIRE, + AREA_ID_CROATIA, + AREA_ID_CYPRUS, + AREA_ID_CZECH_REPUBLIC, + AREA_ID_DENMARK, + AREA_ID_ECUADOR, + AREA_ID_EGYPT, + AREA_ID_ESTONIA, + AREA_ID_FINLAND, + AREA_ID_FRANCE_INC_GUADELOUPE, + AREA_ID_GEORGIA, + AREA_ID_GERMANY, + AREA_ID_GREECE, + AREA_ID_HAITI, + AREA_ID_HONDURAS, + AREA_ID_HONG_KONG, + AREA_ID_HUNGARY, + AREA_ID_ICELAND, + AREA_ID_INDIA, + AREA_ID_INDONESIA, + AREA_ID_IRELAND, + AREA_ID_ISRAEL, + AREA_ID_ITALY, + AREA_ID_JAMAICA, + AREA_ID_JAPAN, + AREA_ID_JORDAN, + AREA_ID_KAZAKHSTAN, + AREA_ID_KENYA, + AREA_ID_KOREA_SOUTH, + AREA_ID_KUWAIT, + AREA_ID_LATVIA, + AREA_ID_LEBANON, + AREA_ID_LITHUANIA, + AREA_ID_LUXEMBOURG, + AREA_ID_MACEDONIA, + AREA_ID_MALAYSIA, + AREA_ID_MEXICO, + AREA_ID_MOLDOVA, + AREA_ID_MOROCCO, + AREA_ID_NEPAL, + AREA_ID_NETHERLAND_ANTILLES, + AREA_ID_NETHERLANDS_INC_BONAIRE, + AREA_ID_NEW_ZEALAND, + AREA_ID_NIGERIA, + AREA_ID_NORWAY, + AREA_ID_OMAN, + AREA_ID_PAKISTAN, + AREA_ID_PARAGUAY, + AREA_ID_PERU, + AREA_ID_PHILIPPINES, + AREA_ID_POLAND, + AREA_ID_PORTUGAL, + AREA_ID_QATAR, + AREA_ID_ROMANIA, + AREA_ID_RUSSIA, + AREA_ID_SAUDI_ARABIA, + AREA_ID_SERBIA, + AREA_ID_SINGAPORE, + AREA_ID_SLOVAKIA, + AREA_ID_SLOVENIA, + AREA_ID_SOUTH_AFRICA, + AREA_ID_SPAIN, + AREA_ID_SRI_LANKA, + AREA_ID_SWEDEN, + AREA_ID_SWITZERLAND, + AREA_ID_TAIWAN, + AREA_ID_THAILAND, + AREA_ID_TRINIDAD_TOBAGO, + AREA_ID_TUNISIA, + AREA_ID_TURKEY, + AREA_ID_TURKMENISTAN, + AREA_ID_UGANDA, + AREA_ID_UKRAINE, + AREA_ID_UNITED_KINGDOM, + AREA_ID_UNITED_STATES, + AREA_ID_URUGUAY, + AREA_ID_UZBEKISTAN, + AREA_ID_VENEZUELA, + AREA_ID_VIETNAM, + AREA_ID_NORDICS, + AREA_ID_BALTIC, + AREA_ID_CZECH_SLOVAKIA, + AREA_ID_CROATIA_SLOVENIA, + AREA_ID_LA_GROUP, + AREA_ID_UNITED_ARAB_EMIRATES, + AREA_ID_EMAT_UK, + AREA_ID_EMAT_FR, + AREA_ID_EMAT_PO, + AREA_ID_INDIA_HI, + AREA_ID_UAE_EN, + AREA_ID_ISRAEL_AR, + AREA_ID_NETHERLANDS_INC_BONAIRE_ENUS, + AREA_ID_NUMS, +}; + +#define DEVICE_TYPE_VALID 0xff +#define DEVICE_TYPE_INVALID -1 + +#define DEVICE_ID_VALID 0xff +#define DEVICE_ID_INVALID -1 + +#define DEVICE_ID_NULL 0 + +enum id_mm_type{ + BID_MM_IOMEM, + BID_MM_IOREMAP, +}; + + +enum id_tp{ + TP_ID_NULL = 0, + TP_ID_GT813, + TP_ID_EKTF2K, + TP_ID_NUMS, +}; + +enum id_lcd{ + LCD_ID_NULL = 0, + LCD_ID_IVO_M101_NWN8, + LCD_ID_EDID_I2C, + LCD_ID_NUMS, +}; + +enum id_key{ + KEY_ID_NULL = 0, + KEY_ID_SHUTTLE, + KEY_ID_BITLAND, + KEY_ID_MALATA, + KEY_ID_CAPSENSE, + KEY_ID_ENGLISH_US, + KEY_ID_ENGLISH_UK, + KEY_ID_TURKISH, + KEY_ID_SLOVENIAN, + KEY_ID_RUSSIAN, + KEY_ID_CZECH, + KEY_ID_HUNGARIAN, + KEY_ID_HINDI, + KEY_ID_THAI, + KEY_ID_PORTUGUESE, + KEY_ID_ARABIC, + KEY_ID_GREEK, + KEY_ID_SWEDISH, + KEY_ID_NORWEGIAN, + KEY_ID_FINNISH, + KEY_ID_DANISH, + KEY_ID_ESTONIAN, + KEY_ID_FRENCH, + KEY_ID_GERMAN, + KEY_ID_HEBREW, + KEY_ID_ITALIAN, + KEY_ID_SPANISH, + KEY_ID_SWISS, + KEY_ID_DUTCH, + KEY_ID_BELGIAN, + KEY_ID_NORDIC, + KEY_ID_NUMS, +}; + +enum id_codec{ + CODEC_ID_NULL = 0, + CODEC_ID_WM8994, + CODEC_ID_WM8900, + CODEC_ID_WM8988, + CODEC_ID_RT5616, + CODEC_ID_RT5621, + CODEC_ID_RT5623, + CODEC_ID_RT3224, + CODEC_ID_RT5625, + CODEC_ID_RT5631, + CODEC_ID_RT5639, + CODEC_ID_RT5640, + CODEC_ID_RT5642, + CODEC_ID_RT3261, + CODEC_ID_AIC3262, + CODEC_ID_RK610, + CODEC_ID_RK616, + CODEC_ID_RK1000, + CODEC_ID_CS42L52, + CODEC_ID_ES8323, + CODEC_ID_NUMS, +}; + + +enum id_wifi{ + WIFI_ID_NULL = 0, + + //brcm wifi + WIFI_ID_BCM, + WIFI_ID_BCM4319, + WIFI_ID_BCM4330, + WIFI_ID_RK903_26M, + WIFI_ID_RK903_37M, + WIFI_ID_BCM4329, + WIFI_ID_RK901, + WIFI_ID_AP6181, + WIFI_ID_AP6210, + WIFI_ID_AP6330, + WIFI_ID_AP6476, + WIFI_ID_AP6493, + WIFI_ID_GB86302I, + + //RealTek wifi + WIFI_ID_RTL8192CU, + WIFI_ID_RTL8188EU, + WIFI_ID_RTL8723AU, + + //Mediatek wifi + WIFI_ID_COMBO, + WIFI_ID_MT5931, + WIFI_ID_RT5370, + WIFI_ID_NUMS, +}; + + +enum id_bt{ + BT_ID_NULL = 0, + + //brcm bluetooth + BT_ID_NH660, + BT_ID_BCM4330, + BT_ID_RK903_26M, + BT_ID_RK903, + BT_ID_BCM4329, + BT_ID_MV8787, + BT_ID_AP6210, + BT_ID_AP6330, + BT_ID_AP6476, + BT_ID_AP6493, + BT_ID_RFKILL, + + //REALTEK bluetooth + BT_ID_RTL8723, + + //MTK bluetooth + BT_ID_MT6622, + + //RDA bluetooth + + BT_ID_NUMS, +}; + + +enum id_gps{ + GPS_ID_NULL = 0, + GPS_ID_RK_HV5820, + GPS_ID_BCM4751, + GPS_ID_GNS7560, + GPS_ID_MT3326, + GPS_ID_NUMS, +}; + +enum id_fm{ + FM_ID_NULL = 0, + FM_ID_NUMS, +}; + +//include/linux/bp-auto.h +enum id_modem +{ + MODEM_ID_NULL = 0, + MODEM_ID_MT6229, //USI MT6229 WCDMA + MODEM_ID_MU509, //huawei MU509 WCDMA + MODEM_ID_MI700, //thinkwill MI700 WCDMA + MODEM_ID_MW100, //thinkwill MW100 WCDMA + MODEM_ID_TD8801, //spreadtrum SC8803 TD-SCDMA + MODEM_ID_SC6610, //spreadtrum SC6610 GSM + MODEM_ID_M50, //spreadtrum RDA GSM + MODEM_ID_MT6250, //ZINN M50 EDGE + MODEM_ID_C66A, //zhongben + MODEM_ID_NUMS, +}; + + +enum id_ddr{ + DDR_ID_NULL = 0, + DDR_ID_NUMS, +}; + +enum id_flash{ + FLASH_ID_NULL = 0, + FLASH_ID_NUMS, +}; + +enum id_hdmi{ + HDMI_ID_NULL = 0, + HDMI_ID_RK30, + HDMI_ID_CAT66121, + HDMI_ID_RK610, + HDMI_ID_NUMS, +}; + +enum id_battery{ + BATTERY_ID_NULL = 0, + BATTERY_ID_3300MAH, + BATTERY_ID_3600MAH, + BATTERY_ID_4700MAH, + BATTERY_ID_7000MAH, + BATTERY_ID_7700MAH, + BATTERY_ID_9000MAH, + BATTERY_ID_BLUEBERRY, + BATTERY_ID_NUMS, +}; + +enum id_charge{ + CHARGE_ID_NULL = 0, + CHARGE_ID_CW2015, + CHARGE_ID_BQ24193, + CHARGE_ID_BQ27541, + CHARGE_ID_OZ8806, + CHARGE_ID_NUMS, +}; + +enum id_backlight{ + BACKLIGHT_ID_NULL = 0, + BACKLIGHT_ID_RK29, + BACKLIGHT_ID_WM831X, + BACKLIGHT_ID_NUMS, +}; + +enum id_headset{ + HEADSET_ID_NULL = 0, + HEADSET_ID_RK29, + HEADSET_ID_NUMS, +}; + +enum id_micphone{ + MICPHONE_ID_NULL = 0, + MICPHONE_ID_ANALOGIC, + MICPHONE_ID_DIGITAL, + MICPHONE_ID_NUMS, +}; + +enum id_speaker{ + SPEAKER_ID_NULL = 0, + SPEAKER_ID_0W8, + SPEAKER_ID_1W0, + SPEAKER_ID_1W5, + SPEAKER_ID_NUMS, +}; + +enum id_vibrator{ + VIBRATOR_ID_NULL = 0, + VIBRATOR_ID_RK29, + VIBRATOR_ID_NUMS, +}; + +enum id_tv{ + TV_ID_NULL = 0, + TV_ID_RK610, + TV_ID_NUMS, +}; + +enum id_echip{ + ECHIP_ID_NULL = 0, + ECHIP_ID_IT8561, + ECHIP_ID_ITE, + ECHIP_ID_NUMS, +}; + +enum id_hub{ + HUB_ID_NULL = 0, + HUB_ID_USB4604, + HUB_ID_NUMS, +}; + +enum id_tpad{ + TPAD_ID_NULL = 0, + TPAD_ID_ELAN, + TPAD_ID_SYNS, + TPAD_ID_NUMS, +}; + +enum id_pmic{ + PMIC_ID_NULL = 0, + PMIC_ID_WM831X, + PMIC_ID_WM8326, + PMIC_ID_TPS65910, + PMIC_ID_ACT8846, + PMIC_ID_NUMS, +}; + +enum id_regulator{ + REGULATOR_ID_NULL = 0, + REGULATOR_ID_PWM3, + REGULATOR_ID_NUMS, +}; + +enum id_rtc{ + RTC_ID_NULL = 0, + RTC_ID_HYM8563, + RTC_ID_PCF8563, + RTC_ID_TPS65910, + RTC_ID_WM8326, + RTC_ID_RK, + RTC_ID_NUMS, +}; + +enum id_camera_front{ + CAMERA_FRONT_ID_NULL = 0, + CAMERA_FRONT_ID_NUMS, +}; + +enum id_camera_back{ + CAMERA_BACK_ID_NULL = 0, + CAMERA_BACK_ID_NUMS, +}; + +enum id_sensor_angle{ + ANGLE_ID_NULL = 0, + ANGLE_ID_NUMS, +}; + +enum id_sensor_accel{ + ACCEL_ID_NULL = 0, + ACCEL_ID_NUMS, +}; + +enum id_sensor_compass{ + COMPASS_ID_NULL = 0, + COMPASS_ID_NUMS, +}; + +enum id_sensor_gyro{ + GYRO_ID_NULL = 0, + GYRO_ID_NUMS, +}; + +enum id_sensor_light{ + LIGHT_ID_NULL = 0, + LIGHT_ID_NUMS, +}; + +enum id_sensor_proximity{ + PROXIMITY_ID_NULL = 0, + PROXIMITY_ID_NUMS, +}; + +enum id_sensor_temperature{ + TEMPERATURE_ID_NULL = 0, + TEMPERATURE_ID_NUMS, +}; + +enum id_sensor_pressure{ + PRESSURE_ID_NULL = 0, + PRESSURE_ID_NUMS, +}; + +enum id_led{ + LED_ID_NULL = 0, + LED_ID_NUMS, +}; + + +#define COUNTRY_AREA_NULL "no" +#define LOCALE_LANGUAGE_NULL "no" +#define LOCALE_REGION_NULL "no" +#define COUNTRY_GEO_NULL "no" +#define TIME_ZONE_NULL "no" +#define USER_DEFINE_NULL "no" + + +#define LOCALE_LANGUAGE_AR "ar" //°¢À­²®ÎÄ +#define LOCALE_LANGUAGE_BE "be" //°×¶íÂÞ˹ÎÄ +#define LOCALE_LANGUAGE_BG "bg" //±£¼ÓÀûÑÇÎÄ +#define LOCALE_LANGUAGE_CA "ca" //¼ÓÌ©ÂÞÄáÑÇÎÄ +#define LOCALE_LANGUAGE_CS "cs" //½Ý¿ËÎÄ +#define LOCALE_LANGUAGE_DA "da" //µ¤ÂóÎÄ +#define LOCALE_LANGUAGE_DE "de" //µÂÎÄ +#define LOCALE_LANGUAGE_EL "el" //Ï£À°ÎÄ +#define LOCALE_LANGUAGE_EN "en" //Ó¢ÎÄ +#define LOCALE_LANGUAGE_ES "es" //Î÷°àÑÀÎÄ +#define LOCALE_LANGUAGE_ET "et" //°®É³ÄáÑÇÎÄ +#define LOCALE_LANGUAGE_FI "fi" //·ÒÀ¼ÎÄ +#define LOCALE_LANGUAGE_FR "fr" //·¨ÎÄ +#define LOCALE_LANGUAGE_HR "hr" //¿ËÂÞµØÑÇÎÄ +#define LOCALE_LANGUAGE_HU "hu" //ÐÙÑÀÀûÎÄ +#define LOCALE_LANGUAGE_IN "in" //Ó¡¶ÈÄáÎ÷ÑÇÎÄ(Ó¡¶ÈÄáÎ÷ÑÇ) +#define LOCALE_LANGUAGE_IS "is" //±ùµºÎÄ +#define LOCALE_LANGUAGE_IT "it" //Òâ´óÀûÎÄ +#define LOCALE_LANGUAGE_IW "iw" //Ï£²®À´ÎÄ +#define LOCALE_LANGUAGE_JA "ja" //ÈÕÎÄ +#define LOCALE_LANGUAGE_KO "ko" //³¯ÏÊÎÄ +#define LOCALE_LANGUAGE_LT "lt" //Á¢ÌÕÍðÎÄ +#define LOCALE_LANGUAGE_LV "lv" //À­ÍÐάÑÇÎÄ(ÁÐÍÐ) +#define LOCALE_LANGUAGE_MK "mk" //ÂíÆä¶ÙÎÄ +#define LOCALE_LANGUAGE_MS "ms" //ÂíÀ´Î÷ÑÇÓï(ÂíÀ´Î÷ÑÇ) +#define LOCALE_LANGUAGE_NL "nl" //ºÉÀ¼ÎÄ +#define LOCALE_LANGUAGE_NO "no" //ŲÍþÎÄ +#define LOCALE_LANGUAGE_PL "pl" //²¨À¼ÎÄ +#define LOCALE_LANGUAGE_PT "pt" //ÆÏÌÑÑÀÎÄ +#define LOCALE_LANGUAGE_RO "ro" //ÂÞÂíÄáÑÇÎÄ +#define LOCALE_LANGUAGE_RU "ru" //¶íÎÄ +#define LOCALE_LANGUAGE_SH "sh" //Èû²¨Äá˹-¿ËÂÞµØÑÇÎÄ +#define LOCALE_LANGUAGE_SK "sk" //˹Âå·¥¿ËÎÄ +#define LOCALE_LANGUAGE_SL "sl" //˹ÂåÎÄÄáÑÇÎÄ +#define LOCALE_LANGUAGE_SQ "sq" //°¢¶û°ÍÄáÑÇÎÄ +#define LOCALE_LANGUAGE_SR "sr" //Èû¶ûάÑÇÎÄ +#define LOCALE_LANGUAGE_SV "sv" //ÈðµäÎÄ +#define LOCALE_LANGUAGE_SW "sw" //˹ÍßÏ£ÀïÓï(¿ÏÄáÑÇ) +#define LOCALE_LANGUAGE_TH "th" //Ì©ÎÄ +#define LOCALE_LANGUAGE_TL "tl" //·ÆÂɱöÓï(·ÆÂɱö) +#define LOCALE_LANGUAGE_TR "tr" //ÍÁ¶úÆäÎÄ +#define LOCALE_LANGUAGE_UK "uk" //ÎÚ¿ËÀ¼ÎÄ +#define LOCALE_LANGUAGE_VI "vi" //Ô½ÄÏÓï(Ô½ÄÏ) +#define LOCALE_LANGUAGE_ZH "zh" //ÖÐÎÄ + + +#define LOCALE_REGION_AE "AE" // °¢À­²®ÎÄ (°¢À­²®ÁªºÏÇõ³¤¹ú) +#define LOCALE_REGION_AL "AL" // °¢¶û°ÍÄáÑÇÎÄ (°¢¶û°ÍÄáÑÇ) +#define LOCALE_REGION_AN "AN" //Netherland Antilles +#define LOCALE_REGION_AO "AO" //Angola +#define LOCALE_REGION_AR "AR" // Î÷°àÑÀÎÄ (°¢¸ùÍ¢) +#define LOCALE_REGION_AT "AT" // µÂÎÄ (°ÂµØÀû) +#define LOCALE_REGION_AT_EURO "AT_EURO" // µÂÎÄ (°ÂµØÀû EURO) +#define LOCALE_REGION_AU "AU" // Ó¢ÎÄ (°Ä´óÀûÑÇ) +#define LOCALE_REGION_AZ "AZ" //Azerbaijan +#define LOCALE_REGION_BA "BA" //Bosnia and Herzegovina +#define LOCALE_REGION_BB "BB" //Barbados +#define LOCALE_REGION_BD "BD" //Bangladesh +#define LOCALE_REGION_BE "BE" // ·¨ÎÄ (±ÈÀûʱ) +#define LOCALE_REGION_BE_EURO "BE_EURO" // ·¨ÎÄ (±ÈÀûʱ EURO) +#define LOCALE_REGION_BG "BG" // ±£¼ÓÀûÑÇÎÄ (±£¼ÓÀûÑÇ) +#define LOCALE_REGION_BH "BH" // °¢À­²®ÎÄ (°ÍÁÖ) +#define LOCALE_REGION_BO "BO" // Î÷°àÑÀÎÄ (²£ÀûάÑÇ) +#define LOCALE_REGION_BR "BR" // ÆÏÌÑÑÀÎÄ (°ÍÎ÷) +#define LOCALE_REGION_BW "BW" //Botswana +#define LOCALE_REGION_BY "BY" // °×¶íÂÞ˹ÎÄ (°×¶íÂÞ˹) +#define LOCALE_REGION_CA "CA" // Ó¢ÎÄ (¼ÓÄôó) +#define LOCALE_REGION_CH "CH" // µÂÎÄ (ÈðÊ¿) +#define LOCALE_REGION_CI "CI" //Cote d'Ivoire +#define LOCALE_REGION_CL "CL" // Î÷°àÑÀÎÄ (ÖÇÀû) +#define LOCALE_REGION_CN "CN" // ÖÐÎÄ (Öйú) +#define LOCALE_REGION_CO "CO" // Î÷°àÑÀÎÄ (¸çÂ×±ÈÑÇ) +#define LOCALE_REGION_CR "CR" // Î÷°àÑÀÎÄ (¸ç˹´ïÀè¼Ó) +#define LOCALE_REGION_CS "CS" //Serbia +#define LOCALE_REGION_CY "CY" //Cyprus +#define LOCALE_REGION_CZ "CZ" // ½Ý¿ËÎÄ (½Ý¿Ë¹²ºÍ¹ú) +#define LOCALE_REGION_DE "DE" // µÂÎÄ (µÂ¹ú) +#define LOCALE_REGION_DE_EURO "DE_EURO" // µÂÎÄ (µÂ¹ú EURO) +#define LOCALE_REGION_DK "DK" // µ¤ÂóÎÄ (µ¤Âó) +#define LOCALE_REGION_DO "DO" // Î÷°àÑÀÎÄ (¶àÃ×Äá¼Ó¹²ºÍ¹ú) +#define LOCALE_REGION_DZ "DZ" // °¢À­²®ÎÄ (°¢¶û¼°ÀûÑÇ) +#define LOCALE_REGION_EC "EC" // Î÷°àÑÀÎÄ (¶ò¹Ï¶à¶û) +#define LOCALE_REGION_EE "EE" // °®É³ÄáÑÇÎÄ (°®É³ÄáÑÇ) +#define LOCALE_REGION_EG "EG" // °¢À­²®ÎÄ (°£¼°) +#define LOCALE_REGION_ES "ES" // Î÷°àÑÀÎÄ (Î÷°àÑÀ) +#define LOCALE_REGION_ES_EURO "ES_EURO" // Î÷°àÑÀÎÄ (Î÷°àÑÀ EURO) +#define LOCALE_REGION_FI "FI" // ·ÒÀ¼ÎÄ (·ÒÀ¼) +#define LOCALE_REGION_FI_EURO "FI_EURO" // ·ÒÀ¼ÎÄ (·ÒÀ¼ EURO) +#define LOCALE_REGION_FR "FR" // ·¨ÎÄ (·¨¹ú) +#define LOCALE_REGION_FR_EURO "FR_EURO" // ·¨ÎÄ (·¨¹ú EURO) +#define LOCALE_REGION_GB "GB" // Ó¢ÎÄ (Ó¢¹ú) +#define LOCALE_REGION_GE "GE" //Georgia +#define LOCALE_REGION_GR "GR" // Ï£À°ÎÄ (Ï£À°) +#define LOCALE_REGION_GT "GT" // Î÷°àÑÀÎÄ (ΣµØÂíÀ­) +#define LOCALE_REGION_HK "HK" // ÖÐÎÄ (Ïã¸Û) +#define LOCALE_REGION_HN "HN" // Î÷°àÑÀÎÄ (ºé¶¼À­Ë¹) +#define LOCALE_REGION_HR "HR" // ¿ËÂÞµØÑÇÎÄ (¿ËÂÞµØÑÇ) +#define LOCALE_REGION_HT "HT" //Haiti +#define LOCALE_REGION_HU "HU" // ÐÙÑÀÀûÎÄ (ÐÙÑÀÀû) +#define LOCALE_REGION_ID "ID" //Indonesia +#define LOCALE_REGION_IE "IE" // Ó¢ÎÄ (°®¶ûÀ¼) +#define LOCALE_REGION_IE_EURO "IE_EURO" // Ó¢ÎÄ (°®¶ûÀ¼ EURO) +#define LOCALE_REGION_IL "IL" // Ï£²®À´ÎÄ (ÒÔÉ«ÁÐ) +#define LOCALE_REGION_IN "IN" //India +#define LOCALE_REGION_IQ "IQ" // °¢À­²®ÎÄ (ÒÁÀ­¿Ë) +#define LOCALE_REGION_IS "IS" // ±ùµºÎÄ (±ùµº) +#define LOCALE_REGION_IT "IT" // Òâ´óÀûÎÄ (Òâ´óÀû) +#define LOCALE_REGION_IT_EURO "IT_EURO" // Òâ´óÀûÎÄ (Òâ´óÀû EURO) +#define LOCALE_REGION_JM "JM" //Jamaica +#define LOCALE_REGION_JO "JO" // °¢À­²®ÎÄ (Ô¼µ©) +#define LOCALE_REGION_JP "JP" // ÈÕÎÄ (ÈÕ±¾) +#define LOCALE_REGION_KE "KE" //Kenya +#define LOCALE_REGION_KR "KR" // ³¯ÏÊÎÄ (Äϳ¯ÏÊ) +#define LOCALE_REGION_KW "KW" // °¢À­²®ÎÄ (¿ÆÍþÌØ) +#define LOCALE_REGION_KZ "KZ" //Kazakhstan +#define LOCALE_REGION_LB "LB" // °¢À­²®ÎÄ (Àè°ÍÄÛ) +#define LOCALE_REGION_LK "LK" //Sri Lanka +#define LOCALE_REGION_LT "LT" // Á¢ÌÕÍðÎÄ (Á¢ÌÕÍð) +#define LOCALE_REGION_LU "LU" // µÂÎÄ (¬ɭ±¤) +#define LOCALE_REGION_LU_EURO "LU_EURO" // µÂÎÄ (¬ɭ±¤ EURO) +#define LOCALE_REGION_LV "LV" // À­ÍÐάÑÇÎÄ(ÁÐÍÐ) (À­ÍÑάÑÇ) +#define LOCALE_REGION_LY "LY" // °¢À­²®ÎÄ (Àû±ÈÑÇ) +#define LOCALE_REGION_MA "MA" // °¢À­²®ÎÄ (ĦÂå¸ç) +#define LOCALE_REGION_MD "MD" //Moldova +#define LOCALE_REGION_MK "MK" // ÂíÆä¶ÙÎÄ (ÂíÆä¶ÙÍõ¹ú) +#define LOCALE_REGION_MX "MX" // Î÷°àÑÀÎÄ (Ä«Î÷¸ç) +#define LOCALE_REGION_MY "MY" //Malaysia +#define LOCALE_REGION_NG "NG" //Nigeria +#define LOCALE_REGION_NI "NI" // Î÷°àÑÀÎÄ (Äá¼ÓÀ­¹Ï) +#define LOCALE_REGION_NL "NL" // ºÉÀ¼ÎÄ (ºÉÀ¼) +#define LOCALE_REGION_NL_EURO "NL_EURO " // ºÉÀ¼ÎÄ (ºÉÀ¼ EURO) +#define LOCALE_REGION_NO "NO" // ŲÍþÎÄ (ŲÍþ) +#define LOCALE_REGION_NP "NP" //Nepal +#define LOCALE_REGION_NY "NO_NY" // ŲÍþÎÄ (ŲÍþ NYNORSK) +#define LOCALE_REGION_NZ "NZ" // Ó¢ÎÄ (ÐÂÎ÷À¼) +#define LOCALE_REGION_OM "QM" // °¢À­²®ÎÄ (°¢Âü) +#define LOCALE_REGION_PA "PA" // Î÷°àÑÀÎÄ (°ÍÄÃÂí) +#define LOCALE_REGION_PE "PE" // Î÷°àÑÀÎÄ (Ãس) +#define LOCALE_REGION_PH "PH" //Philippines +#define LOCALE_REGION_PK "PK" //Pakistan +#define LOCALE_REGION_PL "PL" // ²¨À¼ÎÄ (²¨À¼) +#define LOCALE_REGION_PR "PR" // Î÷°àÑÀÎÄ (²¨¶àÀè¸ç) +#define LOCALE_REGION_PT "PT" // ÆÏÌÑÑÀÎÄ (ÆÏÌÑÑÀ) +#define LOCALE_REGION_PT_EURO "PT_EURO" // ÆÏÌÑÑÀÎÄ (ÆÏÌÑÑÀ EURO) +#define LOCALE_REGION_PY "PY" // Î÷°àÑÀÎÄ (°ÍÀ­¹ç) +#define LOCALE_REGION_QA "QA" // °¢À­²®ÎÄ (¿¨Ëþ¶û) +#define LOCALE_REGION_RO "RO" // ÂÞÂíÄáÑÇÎÄ (ÂÞÂíÄáÑÇ) +#define LOCALE_REGION_RU "RU" // ¶íÎÄ (¶íÂÞ˹) +#define LOCALE_REGION_SA "SA" // °¢À­²®ÎÄ (ɳÌØ°¢À­²®) +#define LOCALE_REGION_SD "SD" // °¢À­²®ÎÄ (ËÕµ¤) +#define LOCALE_REGION_SE "SE" // ÈðµäÎÄ (Èðµä) +#define LOCALE_REGION_SG "SG" //Singapore +#define LOCALE_REGION_SI "SI" // ˹ÂåÎÄÄáÑÇÎÄ (˹ÂåÎÄÄáÑÇ) +#define LOCALE_REGION_SK "SK" // ˹Âå·¥¿ËÎÄ (˹Âå·¥¿Ë) +#define LOCALE_REGION_SV "SV" // Î÷°àÑÀÎÄ (Èø¶ûÍ߶à) +#define LOCALE_REGION_SY "SY" // °¢À­²®ÎÄ (ÐðÀûÑÇ) +#define LOCALE_REGION_TH "TH" // Ì©ÎÄ (Ì©¹ú) +#define LOCALE_REGION_TM "TM" //Turkmenistan +#define LOCALE_REGION_TN "TN" // °¢À­²®ÎÄ (Í»Äá˹) +#define LOCALE_REGION_TR "TR" // ÍÁ¶úÆäÎÄ (ÍÁ¶úÆä) +#define LOCALE_REGION_TT "TT" //Trinidad Tobago +#define LOCALE_REGION_TW "TW" // ÖÐÎÄ (̨Íå) +#define LOCALE_REGION_UA "UA" // ÎÚ¿ËÀ¼ÎÄ (ÎÚ¿ËÀ¼) +#define LOCALE_REGION_UG "UG" //Uganda +#define LOCALE_REGION_US "US" // Ó¢ÎÄ (ÃÀ¹ú) +#define LOCALE_REGION_UY "UY" // Î÷°àÑÀÎÄ (ÎÚÀ­¹ç) +#define LOCALE_REGION_UZ "UZ" //Uzbekistan +#define LOCALE_REGION_VE "VE" // Î÷°àÑÀÎÄ (ίÄÚÈðÀ­) +#define LOCALE_REGION_VN "VN" //Vietnam +#define LOCALE_REGION_YE "YE" // °¢À­²®ÎÄ (Ò²ÃÅ) +#define LOCALE_REGION_YU "YU" // Èû¶ûάÑÇÎÄ (ÄÏ˹À­·ò) +#define LOCALE_REGION_ZA "ZA" // Ó¢ÎÄ (ÄÏ·Ç) + + +#define TIME_ZONE_MARSHALL_ISLANDS "Pacific/Majuro" +#define TIME_ZONE_MIDWAY_ISLAND "Pacific/Midway" +#define TIME_ZONE_HAWAII "Pacific/Honolulu" +#define TIME_ZONE_ALASKA "America/Anchorage" +#define TIME_ZONE_PACIFIC_TIME "America/Los_Angeles" +#define TIME_ZONE_TIJUANA "America/Tijuana" +#define TIME_ZONE_ARIZONA "America/Phoenix" +#define TIME_ZONE_CHIHUAHUA "America/Chihuahua" +#define TIME_ZONE_MOUNTAIN_TIME "America/Denver" +#define TIME_ZONE_CENTRAL_AMERICA "America/Costa_Rica" +#define TIME_ZONE_CENTRAL_TIME "America/Chicago" +#define TIME_ZONE_MEXICO_CITY "America/Mexico_City" +#define TIME_ZONE_SASKATCHEWAN "America/Regina" +#define TIME_ZONE_BOGOTA "America/Bogota" +#define TIME_ZONE_EASTERN_TIME "America/New_York" +#define TIME_ZONE_VENEZUELA "America/Caracas" +#define TIME_ZONE_ATLANTIC_TIME_BARBADOS "America/Barbados" +#define TIME_ZONE_ATLANTIC_TIME_CANADA "America/Halifax" +#define TIME_ZONE_MANAUS "America/Manaus" +#define TIME_ZONE_SANTIAGO "America/Santiago" +#define TIME_ZONE_NEWFOUNDLAND "America/St_Johns" +#define TIME_ZONE_BRASILIA "America/Sao_Paulo" +#define TIME_ZONE_BUENOS_AIRES "America/Argentina/Buenos_Aires" +#define TIME_ZONE_GREENLAND "America/Godthab" +#define TIME_ZONE_MONTEVIDEO "America/Montevideo" +#define TIME_ZONE_MID_ATLANTIC "Atlantic/South_Georgia" +#define TIME_ZONE_AZORES "Atlantic/Azores" +#define TIME_ZONE_CAPE_VERDE_ISLANDS "Atlantic/Cape_Verde" +#define TIME_ZONE_CASABLANCA "Africa/Casablanca" +#define TIME_ZONE_LONDON_DUBLIN "Europe/London" +#define TIME_ZONE_AMSTERDAM_BERLIN "Europe/Amsterdam" +#define TIME_ZONE_BELGRADE "Europe/Belgrade" +#define TIME_ZONE_BRUSSELS "Europe/Brussels" +#define TIME_ZONE_SARAJEVO "Europe/Sarajevo" +#define TIME_ZONE_WINDHOEK "Africa/Windhoek" +#define TIME_ZONE_W_AFRICA_TIME "Africa/Brazzaville" +#define TIME_ZONE_AMMAN_JORDAN "Asia/Amman" +#define TIME_ZONE_ATHENS_ISTANBUL "Europe/Athens" +#define TIME_ZONE_BEIRUT_LEBANON "Asia/Beirut" +#define TIME_ZONE_CAIRO "Africa/Cairo" +#define TIME_ZONE_HELSINKI "Europe/Helsinki" +#define TIME_ZONE_JERUSALEM "Asia/Jerusalem" +#define TIME_ZONE_MINSK "Europe/Minsk" +#define TIME_ZONE_HARARE "Africa/Harare" +#define TIME_ZONE_BAGHDAD "Asia/Baghdad" +#define TIME_ZONE_MOSCOW "Europe/Moscow" +#define TIME_ZONE_KUWAIT "Asia/Kuwait" +#define TIME_ZONE_NAIROBI "Africa/Nairobi" +#define TIME_ZONE_TEHRAN "Asia/Tehran" +#define TIME_ZONE_BAKU "Asia/Baku" +#define TIME_ZONE_TBILISI "Asia/Tbilisi" +#define TIME_ZONE_YEREVAN "Asia/Yerevan" +#define TIME_ZONE_DUBAI "Asia/Dubai" +#define TIME_ZONE_KABUL "Asia/Kabul" +#define TIME_ZONE_ISLAMABAD_KARACHI "Asia/Karachi" +#define TIME_ZONE_URAL_SK "Asia/Oral" +#define TIME_ZONE_YEKATERINBURG "Asia/Yekaterinburg" +#define TIME_ZONE_KOLKATA "Asia/Calcutta" +#define TIME_ZONE_SRI_LANKA "Asia/Colombo" +#define TIME_ZONE_KATHMANDU "Asia/Katmandu" +#define TIME_ZONE_ASTANA "Asia/Almaty" +#define TIME_ZONE_YANGON "Asia/Rangoon" +#define TIME_ZONE_KRASNOYARSK "Asia/Krasnoyarsk" +#define TIME_ZONE_BANGKOK "Asia/Bangkok" +#define TIME_ZONE_BEIJING "Asia/Shanghai" +#define TIME_ZONE_HONG_KONG "Asia/Hong_Kong" +#define TIME_ZONE_IRKUTSK "Asia/Irkutsk" +#define TIME_ZONE_KUALA_LUMPUR "Asia/Kuala_Lumpur" +#define TIME_ZONE_PERTH "Australia/Perth" +#define TIME_ZONE_TAIPEI "Asia/Taipei" +#define TIME_ZONE_SEOUL "Asia/Seoul" +#define TIME_ZONE_TOKYO_OSAKA "Asia/Tokyo" +#define TIME_ZONE_YAKUTSK "Asia/Yakutsk" +#define TIME_ZONE_ADELAIDE "Australia/Adelaide" +#define TIME_ZONE_DARWIN "Australia/Darwin" +#define TIME_ZONE_BRISBANE "Australia/Brisbane" +#define TIME_ZONE_HOBART "Australia/Hobart" +#define TIME_ZONE_SYDNEY_CANBERRA "Australia/Sydney" +#define TIME_ZONE_VLADIVOSTOK "Asia/Vladivostok" +#define TIME_ZONE_GUAM "Pacific/Guam" +#define TIME_ZONE_MAGADAN "Asia/Magadan" +#define TIME_ZONE_AUCKLAND "Pacific/Auckland" +#define TIME_ZONE_FIJI "Pacific/Fiji" +#define TIME_ZONE_TONGA "Pacific/Tongatapu" + + +enum xml_gms_id{ + GMS_ID_SEARCH, + GMS_ID_SEARCH_BY_VOICE, + GMS_ID_GMAIL, + GMS_ID_CONTACT_SYNC, + GMS_ID_CALENDAR_SYNC, + GMS_ID_TALK, + GMS_ID_CHROME, + GMS_ID_GOOGLES, + GMS_ID_MAPS, + GMS_ID_STREET_VIEW, + GMS_ID_YOUTUBE, + GMS_ID_GOOGLE_PLAY_STORE, + GMS_ID_GOOGLE_PLAY_BOOKS, + GMS_ID_GOOGLE_PLAY_MOVIES, + GMS_ID_GOOGLE_PLAY_MAGAZINES, + GMS_ID_GOOGLE_PLAY_MUSIC, + //GMS_ID_WIDEVINE, + GMS_ID_FACELOCK, + GMS_ID_GOOGLE_TTS, + //GMS_ID_GOOGLE_VOICE, + //GMS_ID_GOGGLES, + //GMS_ID_EARTH, + //GMS_ID_ORKUT, + //GMS_ID_DOCS_DRIVE, + GMS_ID_NEWS_WEATHER, + //GMS_ID_SHOPPER, + //GMS_ID_BLOGGER, + //GMS_ID_CURRENTS, + //GMS_ID_KEEP, + //GMS_ID_TRANSLATE, + //GMS_ID_KOREAN_IME, + //GMS_ID_PINYIN_IME, + GMS_ID_NUMS, +}; + + +struct xml_gms_name{ + int gms_id; + char gms_name[48]; +}; + + +static struct xml_gms_name gms_name[GMS_ID_NUMS] = +{ + {GMS_ID_SEARCH, "QuickSearchBox.apk"}, + {GMS_ID_SEARCH_BY_VOICE, "VoiceSearchStub.apk"}, + {GMS_ID_GMAIL, "Gmail2.apk"}, + {GMS_ID_CONTACT_SYNC, "GoogleContactsSyncAdapter.apk"}, + {GMS_ID_CALENDAR_SYNC, "GoogleCalendarSyncAdapter.apk"}, + {GMS_ID_TALK, "Talk.apk"}, + {GMS_ID_CHROME, "Chrome.apk"}, + {GMS_ID_GOOGLES, "PlusOne.apk"}, + {GMS_ID_MAPS, "GMS_Maps.apk"}, + {GMS_ID_STREET_VIEW, "Street.apk"}, + {GMS_ID_YOUTUBE, "YouTube.apk"}, + {GMS_ID_GOOGLE_PLAY_STORE, "Phonesky.apk"}, + {GMS_ID_GOOGLE_PLAY_BOOKS, "Books.apk"}, + {GMS_ID_GOOGLE_PLAY_MOVIES, "Videos.apk"}, + {GMS_ID_GOOGLE_PLAY_MAGAZINES, "Magazines.apk"}, + {GMS_ID_GOOGLE_PLAY_MUSIC, "Music.apk"}, + //{GMS_ID_WIDEVINE, ""}, + {GMS_ID_FACELOCK, "FaceLock.apk"}, + {GMS_ID_GOOGLE_TTS, "PicoTts.apk"}, + //{GMS_ID_GOOGLE_VOICE, "Velvet.apk"},//? + //{GMS_ID_GOGGLES, "Velvet.apk"},//? + //{GMS_ID_EARTH, "Velvet.apk"}, + //{GMS_ID_ORKUT, "Velvet.apk"}, + //{GMS_ID_DOCS_DRIVE, "Velvet.apk"}, + {GMS_ID_NEWS_WEATHER, "GenieWidget.apk"}, + //{GMS_ID_SHOPPER, "Velvet.apk"}, + //{GMS_ID_BLOGGER, "Velvet.apk"}, + //{GMS_ID_CURRENTS, "Velvet.apk"}, + //{GMS_ID_KEEP, "Velvet.apk"}, + //{GMS_ID_TRANSLATE, "Velvet.apk"}, + //{GMS_ID_KOREAN_IME, "Velvet.apk"}, + //{GMS_ID_PINYIN_IME, "PinyinIME.apk"}, +}; + + + +struct auto_xml_config{ + int area_id; + int gms_flag[GMS_ID_NUMS]; +}; + + +static struct auto_xml_config xml_config[AREA_ID_NUMS] = { + {AREA_ID_NULL, {1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, + {AREA_ID_ALBANIA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_ALGERIA,{0,1,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1}}, + {AREA_ID_ANGOLA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_ARGENTINA,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_AUSTRALIA,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, + {AREA_ID_AUSTRIA,{0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,0,0,0,0}}, + {AREA_ID_AZERBAIJAN,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_BAHRAIN,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_BANGLADESH,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_BARBADOS,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_BELARUS,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_BELGIUM,{0,1,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0}}, + {AREA_ID_BOLIVIA,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_BOSNIA_AND_HERZEGOVINA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_BOTSWANA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0}}, + {AREA_ID_BRAZIL,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0}}, + {AREA_ID_BULGARIA,{0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_CANADA,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0}}, + {AREA_ID_CHILE,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,0}}, + {AREA_ID_CHINA,{1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_COLOMBIA,{0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_COTE_D_IVOIRE,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_CROATIA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_CYPRUS,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_CZECH_REPUBLIC,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_DENMARK,{0,1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_ECUADOR,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_EGYPT,{0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1}}, + {AREA_ID_ESTONIA,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_FINLAND,{0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_FRANCE_INC_GUADELOUPE,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0}}, + {AREA_ID_GEORGIA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_GERMANY,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0}}, + {AREA_ID_GREECE,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_HAITI,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_HONDURAS,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_HONG_KONG,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_HUNGARY,{0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_ICELAND,{0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_INDIA,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0}}, + {AREA_ID_INDONESIA,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0}}, + {AREA_ID_IRELAND,{0,1,0,0,0,0,0,0,1,1,0,0,1,1,1,0,0,0,0}}, + {AREA_ID_ISRAEL,{0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,0,1,0}}, + {AREA_ID_ITALY,{0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0}}, + {AREA_ID_JAMAICA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_JAPAN,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0}}, + {AREA_ID_JORDAN,{0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,1}}, + {AREA_ID_KAZAKHSTAN,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_KENYA,{0,1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_KOREA_SOUTH,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,1,0}}, + {AREA_ID_KUWAIT,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_LATVIA,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_LEBANON,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,0}}, + {AREA_ID_LITHUANIA,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_LUXEMBOURG,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,0,0,0,1}}, + {AREA_ID_MACEDONIA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_MALAYSIA,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,0}}, + {AREA_ID_MEXICO,{0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,1,0,0,0}}, + {AREA_ID_MOLDOVA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_MOROCCO,{0,1,0,0,0,0,0,1,1,1,0,1,1,1,1,1,0,1,1}}, + {AREA_ID_NEPAL,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_NETHERLAND_ANTILLES,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_NETHERLANDS_INC_BONAIRE,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0}}, + {AREA_ID_NEW_ZEALAND,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0}}, + {AREA_ID_NIGERIA,{0,1,0,0,0,0,0,1,1,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_NORWAY,{0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_OMAN,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_PAKISTAN,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_PARAGUAY,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_PERU,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0}}, + {AREA_ID_PHILIPPINES,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_POLAND,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_PORTUGAL,{0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,0,0,0,0}}, + {AREA_ID_QATAR,{0,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_ROMANIA,{0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_RUSSIA,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,1,0}}, + {AREA_ID_SAUDI_ARABIA,{0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,1,0}}, + {AREA_ID_SERBIA,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_SINGAPORE,{0,1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_SLOVAKIA,{0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_SLOVENIA,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_SOUTH_AFRICA,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_SPAIN,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0}}, + {AREA_ID_SRI_LANKA,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_SWEDEN,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_SWITZERLAND,{0,1,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0}}, + {AREA_ID_TAIWAN,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0}}, + {AREA_ID_THAILAND,{0,1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,1}}, + {AREA_ID_TRINIDAD_TOBAGO,{0,1,0,0,0,0,0,1,0,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_TUNISIA,{0,1,0,0,0,0,0,0,1,1,0,1,1,1,1,1,0,1,1}}, + {AREA_ID_TURKEY,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0}}, + {AREA_ID_TURKMENISTAN,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_UGANDA,{0,1,0,0,0,0,0,1,1,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_UKRAINE,{0,1,0,0,0,0,0,0,0,1,1,0,1,1,1,1,0,1,0}}, + {AREA_ID_UNITED_KINGDOM,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, + {AREA_ID_UNITED_STATES,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}, + {AREA_ID_URUGUAY,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_UZBEKISTAN,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,1}}, + {AREA_ID_VENEZUELA,{0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0}}, + {AREA_ID_VIETNAM,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,1,0}}, + {AREA_ID_NORDICS,{0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_BALTIC,{0,1,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_CZECH_SLOVAKIA,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_CROATIA_SLOVENIA,{0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,0,0,1}}, + {AREA_ID_LA_GROUP,{0,0,0,0,0,0,0,1,1,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_UNITED_ARAB_EMIRATES,{0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_EMAT_UK,{0,1,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,0}}, + {AREA_ID_EMAT_FR,{0,1,0,0,0,0,0,0,0,1,0,0,1,1,1,1,0,0,1}}, + {AREA_ID_EMAT_PO,{0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,1}}, + {AREA_ID_INDIA_HI,{0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0}}, + {AREA_ID_UAE_EN,{0,0,0,0,0,0,0,1,0,1,0,1,1,1,1,1,0,0,0}}, + {AREA_ID_ISRAEL_AR,{0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,0,1,0}}, + {AREA_ID_NETHERLANDS_INC_BONAIRE_ENUS,{0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,1,0}}, +}; + + +struct area_id_name{ + int type; + int id; + char country_area[32]; //country or area name such as china + char locale_language[4]; //locale language name such as zh + char locale_region[8]; //locale region name such as CN + char country_geo[20]; //country geographical position such as asia + char timezone[32]; //time zone such as Asia/Shanghai + char user_define[20]; //user-defined name such as A10,A12,A13 +}; + + +struct operator_id_name{ + int type; //type + int id; + char operator_name[20]; //operator name such as CHINA MOBILE + char locale_region[8]; //area name such as CN +}; + +struct reserve_id_name{ + int type; //type + int id; + char reserve_name[20]; //reserve name + char locale_region[20]; +}; + + +struct device_id_name{ + char type; //device type + char id; //board id + char type_name[14]; + char driver_name[16]; + char dev_name[16]; //name + char description[30]; // description + unsigned short device_id;//device_id and only one + //short select; // 1:device is selected 0:not +}; + +struct board_id_flag{ + atomic_t debug_flag; +}; + + + +enum I2C_BUS_NUM{ + BUS_NUM_I2C_0, + BUS_NUM_I2C_1, + BUS_NUM_I2C_2, + BUS_NUM_I2C_3, + BUS_NUM_I2C_4, + BUS_NUM_I2C_GPIO, + BUS_NUM_I2C_MAX, +}; + + +enum { + BUS_NUM_SPI_0, + BUS_NUM_SPI_1, + BUS_NUM_SPI_MAX, +}; + + +enum board_device_type{ + BOARD_DEVICE_TYPE_VALID, + BOARD_DEVICE_TYPE_INVALID, + BOARD_DEVICE_TYPE_I2C, + BOARD_DEVICE_TYPE_SPI, + BOARD_DEVICE_TYPE_PLATFORM, + BOARD_DEVICE_TYPE_NUMS, +}; + +struct valid_invalid_name{ + char name[32]; +}; + + +struct board_device_table{ + void *addr; + int size; + int type; + int bus; +}; + + +#include + +struct board_id_private_data{ + struct device *dev; + struct mutex operation_mutex; + struct area_id_name area_area_id_name[AREA_ID_NUMS]; + struct operator_id_name area_operator_id_name[OPERATOR_ID_NUMS]; + struct reserve_id_name area_reserve_id_name[RESERVE_ID_NUMS]; + struct area_id_name area_select; + struct operator_id_name operator_select; + struct reserve_id_name reserve_select; + + struct device_id_name tp_id_name[TP_ID_NUMS]; + struct device_id_name lcd_id_name[LCD_ID_NUMS]; + struct device_id_name key_id_name[KEY_ID_NUMS]; + struct device_id_name codec_id_name[CODEC_ID_NUMS]; + struct device_id_name wifi_id_name[WIFI_ID_NUMS]; + struct device_id_name bt_id_name[BT_ID_NUMS]; + struct device_id_name gps_id_name[GPS_ID_NUMS]; + struct device_id_name fm_id_name[FM_ID_NUMS]; + struct device_id_name modem_id_name[MODEM_ID_NUMS]; + struct device_id_name ddr_id_name[DDR_ID_NUMS]; + struct device_id_name flash_id_name[FLASH_ID_NUMS]; + struct device_id_name hdmi_id_name[HDMI_ID_NUMS]; + struct device_id_name battery_id_name[BATTERY_ID_NUMS]; + struct device_id_name charge_id_name[CHARGE_ID_NUMS]; + struct device_id_name backlight_id_name[BACKLIGHT_ID_NUMS]; + struct device_id_name headset_id_name[HEADSET_ID_NUMS]; + struct device_id_name micphone_id_name[MICPHONE_ID_NUMS]; + struct device_id_name speaker_id_name[SPEAKER_ID_NUMS]; + struct device_id_name vibrator_id_name[VIBRATOR_ID_NUMS]; + struct device_id_name tv_id_name[TV_ID_NUMS]; + struct device_id_name echip_id_name[ECHIP_ID_NUMS]; + struct device_id_name hub_id_name[HUB_ID_NUMS]; + struct device_id_name tpad_id_name[TPAD_ID_NUMS]; + + struct device_id_name pmic_id_name[PMIC_ID_NUMS]; + struct device_id_name regulator_id_name[REGULATOR_ID_NUMS]; + struct device_id_name rtc_id_name[RTC_ID_NUMS]; + struct device_id_name camera_front_id_name[CAMERA_FRONT_ID_NUMS]; + struct device_id_name camera_back_id_name[CAMERA_BACK_ID_NUMS]; + struct device_id_name sensor_angle_id_name[ANGLE_ID_NUMS]; + struct device_id_name sensor_accel_id_name[ACCEL_ID_NUMS]; + struct device_id_name sensor_compass_id_name[COMPASS_ID_NUMS]; + struct device_id_name sensor_gyroscope_id_name[GYRO_ID_NUMS]; + struct device_id_name sensor_light_id_name[LIGHT_ID_NUMS]; + struct device_id_name sensor_proximity_id_name[PROXIMITY_ID_NUMS]; + struct device_id_name sensor_temperature_id_name[TEMPERATURE_ID_NUMS]; + struct device_id_name sensor_pressure_id_name[PRESSURE_ID_NUMS]; + struct device_id_name device_selected[DEVICE_NUM_TYPES]; + + + struct device_id_name *device_start_addr[DEVICE_NUM_TYPES]; + char device_num_max[DEVICE_NUM_TYPES]; + + struct board_id_flag flags; + struct file_operations id_fops; + struct miscdevice id_miscdev; + struct board_id_platform_data *pdata; + + //for debug + struct file* board_id_data_filp; + mm_segment_t board_id_data_fs; + struct file* board_id_area_filp; + mm_segment_t board_id_area_fs; + struct file* board_id_device_filp; + mm_segment_t board_id_device_fs; + + char vendor_data[DEVICE_NUM_TYPES]; + +}; + + +extern char board_id_get(enum type_devices type); +extern int board_id_get_from_flash(char *pbuf, int type); + + +#if 1 +#define DBG_ID(x...) if(g_board_id && (atomic_read(&g_board_id->flags.debug_flag) == 1)) printk(x) +#else +#define DBG_ID(x...) +#endif + + +#define BOARD_ID_IOCTL_BASE 'b' + +//#define BOARD_ID_IOCTL_READ_ALL _IOWR(BOARD_ID_IOCTL_BASE, 0x00, struct board_id_private_data) +//#define BOARD_ID_IOCTL_WRITE_ALL _IOWR(BOARD_ID_IOCTL_BASE, 0x30, struct board_id_private_data) + + +#define BOARD_ID_IOCTL_READ_AREA_ID _IOR(BOARD_ID_IOCTL_BASE, 0x80, struct area_id_name) +#define BOARD_ID_IOCTL_READ_OPERATOR_ID _IOR(BOARD_ID_IOCTL_BASE, 0x81, struct operator_id_name) +#define BOARD_ID_IOCTL_READ_RESERVE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x82, struct reserve_id_name) + +#define BOARD_ID_IOCTL_READ_AREA_NAME_BY_ID _IOWR(BOARD_ID_IOCTL_BASE, 0x70, struct area_id_name) +#define BOARD_ID_IOCTL_READ_OPERATOR_NAME_BY_ID _IOWR(BOARD_ID_IOCTL_BASE, 0x71, struct operator_id_name) +#define BOARD_ID_IOCTL_READ_RESERVE_NAME_BY_ID _IOWR(BOARD_ID_IOCTL_BASE, 0x72, struct reserve_id_name) +#define BOARD_ID_IOCTL_READ_DEVICE_NAME_BY_ID _IOWR(BOARD_ID_IOCTL_BASE, 0x73, struct device_id_name) + + + +#define BOARD_ID_IOCTL_READ_TP_ID _IOR(BOARD_ID_IOCTL_BASE, 0x01, struct device_id_name) +#define BOARD_ID_IOCTL_READ_LCD_ID _IOR(BOARD_ID_IOCTL_BASE, 0x02, struct device_id_name) +#define BOARD_ID_IOCTL_READ_KEY_ID _IOR(BOARD_ID_IOCTL_BASE, 0x03, struct device_id_name) +#define BOARD_ID_IOCTL_READ_CODEC_ID _IOR(BOARD_ID_IOCTL_BASE, 0x04, struct device_id_name) +#define BOARD_ID_IOCTL_READ_WIFI_ID _IOR(BOARD_ID_IOCTL_BASE, 0x05, struct device_id_name) +#define BOARD_ID_IOCTL_READ_BT_ID _IOR(BOARD_ID_IOCTL_BASE, 0x06, struct device_id_name) +#define BOARD_ID_IOCTL_READ_GPS_ID _IOR(BOARD_ID_IOCTL_BASE, 0x07, struct device_id_name) +#define BOARD_ID_IOCTL_READ_FM_ID _IOR(BOARD_ID_IOCTL_BASE, 0x08, struct device_id_name) +#define BOARD_ID_IOCTL_READ_MODEM_ID _IOR(BOARD_ID_IOCTL_BASE, 0x09, struct device_id_name) +#define BOARD_ID_IOCTL_READ_DDR_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0a, struct device_id_name) +#define BOARD_ID_IOCTL_READ_FLASH_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0b, struct device_id_name) +#define BOARD_ID_IOCTL_READ_HDMI_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0c, struct device_id_name) +#define BOARD_ID_IOCTL_READ_BATTERY_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0d, struct device_id_name) +#define BOARD_ID_IOCTL_READ_CHARGE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0e, struct device_id_name) +#define BOARD_ID_IOCTL_READ_BACKLIGHT_ID _IOR(BOARD_ID_IOCTL_BASE, 0x0f, struct device_id_name) +#define BOARD_ID_IOCTL_READ_HEADSET_ID _IOR(BOARD_ID_IOCTL_BASE, 0x10, struct device_id_name) +#define BOARD_ID_IOCTL_READ_MICPHONE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x11, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SPEAKER_ID _IOR(BOARD_ID_IOCTL_BASE, 0x12, struct device_id_name) +#define BOARD_ID_IOCTL_READ_VIBRATOR_ID _IOR(BOARD_ID_IOCTL_BASE, 0x13, struct device_id_name) +#define BOARD_ID_IOCTL_READ_TV_ID _IOR(BOARD_ID_IOCTL_BASE, 0x14, struct device_id_name) +#define BOARD_ID_IOCTL_READ_ECHIP_ID _IOR(BOARD_ID_IOCTL_BASE, 0x15, struct device_id_name) +#define BOARD_ID_IOCTL_READ_HUB_ID _IOR(BOARD_ID_IOCTL_BASE, 0x16, struct device_id_name) +#define BOARD_ID_IOCTL_READ_TPAD_ID _IOR(BOARD_ID_IOCTL_BASE, 0x17, struct device_id_name) + + +#define BOARD_ID_IOCTL_READ_PMIC_ID _IOR(BOARD_ID_IOCTL_BASE, 0x20, struct device_id_name) +#define BOARD_ID_IOCTL_READ_REGULATOR_ID _IOR(BOARD_ID_IOCTL_BASE, 0x21, struct device_id_name) +#define BOARD_ID_IOCTL_READ_RTC_ID _IOR(BOARD_ID_IOCTL_BASE, 0x22, struct device_id_name) +#define BOARD_ID_IOCTL_READ_CAMERA_FRONT_ID _IOR(BOARD_ID_IOCTL_BASE, 0x23, struct device_id_name) +#define BOARD_ID_IOCTL_READ_CAMERA_BACK_ID _IOR(BOARD_ID_IOCTL_BASE, 0x24, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_ANGLE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x25, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_ACCEL_ID _IOR(BOARD_ID_IOCTL_BASE, 0x26, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_COMPASS_ID _IOR(BOARD_ID_IOCTL_BASE, 0x27, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_GYRO_ID _IOR(BOARD_ID_IOCTL_BASE, 0x28, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_LIGHT_ID _IOR(BOARD_ID_IOCTL_BASE, 0x29, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_PROXIMITY_ID _IOR(BOARD_ID_IOCTL_BASE, 0x2A, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_TEMPERATURE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x2B, struct device_id_name) +#define BOARD_ID_IOCTL_READ_SENSOR_PRESSURE_ID _IOR(BOARD_ID_IOCTL_BASE, 0x2C, struct device_id_name) + + +#define BOARD_ID_IOCTL_WRITE_AREA_ID _IOW(BOARD_ID_IOCTL_BASE, 0x90, struct area_id_name) +#define BOARD_ID_IOCTL_WRITE_OPERATOR_ID _IOW(BOARD_ID_IOCTL_BASE, 0x91, struct operator_id_name) +#define BOARD_ID_IOCTL_WRITE_RESERVE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x92, struct reserve_id_name) + + +#define BOARD_ID_IOCTL_WRITE_TP_ID _IOW(BOARD_ID_IOCTL_BASE, 0x31, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_LCD_ID _IOW(BOARD_ID_IOCTL_BASE, 0x32, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_KEY_ID _IOW(BOARD_ID_IOCTL_BASE, 0x33, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_CODEC_ID _IOW(BOARD_ID_IOCTL_BASE, 0x34, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_WIFI_ID _IOW(BOARD_ID_IOCTL_BASE, 0x35, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_BT_ID _IOW(BOARD_ID_IOCTL_BASE, 0x36, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_GPS_ID _IOW(BOARD_ID_IOCTL_BASE, 0x37, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_FM_ID _IOW(BOARD_ID_IOCTL_BASE, 0x38, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_MODEM_ID _IOW(BOARD_ID_IOCTL_BASE, 0x39, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_DDR_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3a, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_FLASH_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3b, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_HDMI_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3c, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_BATTERY_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3d, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_CHARGE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3e, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_BACKLIGHT_ID _IOW(BOARD_ID_IOCTL_BASE, 0x3f, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_HEADSET_ID _IOW(BOARD_ID_IOCTL_BASE, 0x40, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_MICPHONE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x41, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SPEAKER_ID _IOW(BOARD_ID_IOCTL_BASE, 0x42, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_VIBRATOR_ID _IOW(BOARD_ID_IOCTL_BASE, 0x43, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_TV_ID _IOW(BOARD_ID_IOCTL_BASE, 0x44, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_ECHIP_ID _IOW(BOARD_ID_IOCTL_BASE, 0x45, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_HUB_ID _IOW(BOARD_ID_IOCTL_BASE, 0x46, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_TPAD_ID _IOW(BOARD_ID_IOCTL_BASE, 0x47, struct device_id_name) + +#define BOARD_ID_IOCTL_WRITE_PMIC_ID _IOW(BOARD_ID_IOCTL_BASE, 0x50, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_REGULATOR_ID _IOW(BOARD_ID_IOCTL_BASE, 0x51, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_RTC_ID _IOW(BOARD_ID_IOCTL_BASE, 0x52, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_CAMERA_FRONT_ID _IOW(BOARD_ID_IOCTL_BASE, 0x53, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_CAMERA_BACK_ID _IOW(BOARD_ID_IOCTL_BASE, 0x54, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_ANGLE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x55, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_ACCEL_ID _IOW(BOARD_ID_IOCTL_BASE, 0x56, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_COMPASS_ID _IOW(BOARD_ID_IOCTL_BASE, 0x57, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_GYRO_ID _IOW(BOARD_ID_IOCTL_BASE, 0x58, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_LIGHT_ID _IOW(BOARD_ID_IOCTL_BASE, 0x59, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_PROXIMITY_ID _IOW(BOARD_ID_IOCTL_BASE, 0x5A, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_TEMPERATURE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x5B, struct device_id_name) +#define BOARD_ID_IOCTL_WRITE_SENSOR_PRESSURE_ID _IOW(BOARD_ID_IOCTL_BASE, 0x5C, struct device_id_name) + +#define BOARD_ID_IOCTL_WRITE_AREA_FLASH _IOW(BOARD_ID_IOCTL_BASE, 0x60, struct area_id_name) +#define BOARD_ID_IOCTL_WRITE_DEVICE_FLASH _IOW(BOARD_ID_IOCTL_BASE, 0x61, struct device_id_name) +#define BOARD_ID_IOCTL_READ_STATUS _IOR(BOARD_ID_IOCTL_BASE, 0x62, char) +#define BOARD_ID_IOCTL_READ_VENDOR_DATA _IOR(BOARD_ID_IOCTL_BASE, 0x63, char[DEVICE_NUM_TYPES]) + +#endif +