Skip to content
Permalink
Browse files

app_info: expose baseband version for some user-mode changes

Also, >Huawei in charge of writing good code.

At least the coding style in this change matches the original file.
AKA shit.

Conflicts:
	arch/arm/mach-msm/hardware_self_adapt.c
	fs/proc/app_info.c
  • Loading branch information...
Dazzozo committed Mar 11, 2013
1 parent e0b6022 commit 8d29a56d48035ee5b8257989b6ca003800192913
Showing with 36 additions and 12 deletions.
  1. +19 −0 arch/arm/mach-msm/hardware_self_adapt.c
  2. +16 −12 fs/proc/app_info.c
  3. +1 −0 include/linux/hardware_self_adapt.h
@@ -236,6 +236,25 @@ char *get_bt_device_name(void)

return bt_device_array[i].dev_name;
}

char *get_baseband_version(void)
{
char *baseband_version = NULL;
#ifdef CONFIG_FRAMEBUF_SELF_ADAPT_HACK
if(frame_buffer_boosted)
{
baseband_version = "109808";
}
else
{
#endif
baseband_version = "2030";
#ifdef CONFIG_FRAMEBUF_SELF_ADAPT_HACK
}
#endif
return baseband_version;
}

void get_audio_property(char *audio_property)
{
unsigned int property = AUDIO_PROPERTY_INVALID;
@@ -314,25 +314,27 @@ static int app_version_read_proc(char *page, char **start, off_t off,
char *lcd_name = NULL;
char * touch_info = NULL;
char *wifi_device_name = NULL;
char *bt_device_name = NULL;
char *bt_device_name = NULL;
char *baseband_version = NULL;
char audio_property[AUDIO_PROPERTY_LEN] = {0};
char s_board_id[BOARD_ID_LEN + BOARD_ID_SUB_VER_LEN] = {0};
char sub_ver[BOARD_ID_SUB_VER_LEN] = {0};
char sub_ver[BOARD_ID_SUB_VER_LEN] = {0};
char hw_version_id[HW_VERSION + HW_VERSION_SUB_VER] = {0};
char hw_version_sub_ver[HW_VERSION_SUB_VER] = {0};
char *compass_gs_name = NULL;
char *sensors_list_name = NULL;
set_s_board_hw_version(s_board_id,hw_version_id);
sprintf(sub_ver, ".Ver%c", 'A'+(char)get_hw_sub_board_id());
sprintf(hw_version_sub_ver, "VER.%c", 'A'+(char)get_hw_sub_board_id());
strcat(s_board_id, sub_ver);
strcat(hw_version_id, hw_version_sub_ver);
set_s_board_hw_version_special(hw_version_id,hw_version_sub_ver,s_board_id,sub_ver);
set_s_board_hw_version(s_board_id,hw_version_id);
sprintf(sub_ver, ".Ver%c", 'A'+(char)get_hw_sub_board_id());
sprintf(hw_version_sub_ver, "VER.%c", 'A'+(char)get_hw_sub_board_id());
strcat(s_board_id, sub_ver);
strcat(hw_version_id, hw_version_sub_ver);
set_s_board_hw_version_special(hw_version_id,hw_version_sub_ver,s_board_id,sub_ver);
compass_gs_name=get_compass_gs_position_name();
sensors_list_name = get_sensors_list_name();
lcd_name = get_lcd_panel_name();
wifi_device_name = get_wifi_device_name();
bt_device_name = get_bt_device_name();
baseband_version = get_baseband_version();
get_audio_property(audio_property);
touch_info = get_touch_info();
if (touch_info == NULL)
@@ -356,11 +358,12 @@ static int app_version_read_proc(char *page, char **start, off_t off,
"compass_gs_position:\n%s\n"
"sensors_list:\n%s\n"
"hw_version:\n%s\n"
"wifi_chip:\n%s\n"
"bt_chip:\n%s\n"
"baseband_version:\n%s\n"
"wifi_chip:\n%s\n"
"bt_chip:\n%s\n"
"audio_property:\n%s\n"
"touch_info:\n%s\n",
appsboot_version, ker_ver, str_flash_nand_id, s_board_id, lcd_name, camera_id, ts_id,charge_flag, compass_gs_name,sensors_list_name, hw_version_id,wifi_device_name,bt_device_name,audio_property, touch_info);
appsboot_version, ker_ver, str_flash_nand_id, s_board_id, lcd_name, camera_id, ts_id, charge_flag, compass_gs_name, sensors_list_name, hw_version_id, baseband_version, wifi_device_name, bt_device_name, audio_property, touch_info);
#else
len = snprintf(page, PAGE_SIZE, "APPSBOOT:\n"
"%s\n"
@@ -375,9 +378,10 @@ static int app_version_read_proc(char *page, char **start, off_t off,
"compass_gs_position:\n%s\n"
"sensors_list:\n%s\n"
"hw_version:\n%s\n"
"baseband_version:\n%s\n"
"audio_property:\n%s\n"
"touch_info:\n%s\n",
appsboot_version, ker_ver, str_flash_nand_id, s_board_id, lcd_name, camera_id, ts_id, compass_gs_name,sensors_list_name, hw_version_id,audio_property, touch_info);
appsboot_version, ker_ver, str_flash_nand_id, s_board_id, lcd_name, camera_id, ts_id, compass_gs_name, sensors_list_name, hw_version_id, baseband_version, audio_property, touch_info);
#endif

return proc_calc_metrics(page, start, off, count, eof, len);
@@ -321,6 +321,7 @@ int board_support_ofn(bool * ofn_support);
char *get_compass_gs_position_name(void);
char *get_sensors_list_name(void);
char *get_wifi_device_name(void);
char *get_baseband_version(void);
lcd_panel_type get_lcd_panel_type(void);
hw_bt_device_model get_hw_bt_device_model(void);
char *get_bt_device_name(void);

0 comments on commit 8d29a56

Please sign in to comment.
You can’t perform that action at this time.