static void set_pantech_debug_option(struct pansw_classdev *sw_dev, int value) { int r; debug_flag.bytes = (uint32_t)value; printk(KERN_ERR "%s is called\n", __func__); if (debug_flag.bits.alog) { printk(KERN_INFO "%s: android UART log ON\n", __func__); logger_set_android_uart_log(1); } else { printk(KERN_INFO "%s: android UART log OFF\n", __func__); logger_set_android_uart_log(0); } if (console_loglevel == 0) printk(KERN_INFO "%s: console_loglevel (0x%x)\n", __func__, debug_flag.bits.conloglvl); console_loglevel = debug_flag.bits.conloglvl; if (console_loglevel) printk(KERN_INFO "%s: console_loglevel (0x%x)\n", __func__, debug_flag.bits.conloglvl); if (debug_flag.bits.dmterminal) { printk(KERN_INFO "%s: UART ROOT SHELL dmterminal ON\n", __func__); msm_hsl_console_set_terminal_onoff(1); } else { printk(KERN_INFO "%s: UART ROOT SHELL dmterminal OFF\n", __func__); msm_hsl_console_set_terminal_onoff(0); } r = msm_nv_write(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes); printk(KERN_ERR "%s is called debug_flag.bytes:%x\n", __func__,debug_flag.bytes); if (r != NV_DONE_S) { // minus : RPC error, plus : NV error printk(KERN_ERR "%s: msm_nv_write error(%d)\n", __func__, r); return; } }
static void set_pantech_debug_option(struct pansw_classdev *sw_dev, int value) { int r; debug_flag.bytes = (uint32_t)value; if (debug_flag.bits.alog) { printk(KERN_INFO "%s: android UART log ON\n", __func__); logger_set_android_uart_log(1); } else { printk(KERN_INFO "%s: android UART log OFF\n", __func__); logger_set_android_uart_log(0); } if (console_loglevel == 0) printk(KERN_INFO "%s: console_loglevel (0x%x)\n", __func__, debug_flag.bits.conloglvl); console_loglevel = debug_flag.bits.conloglvl; if (console_loglevel) printk(KERN_INFO "%s: console_loglevel (0x%x)\n", __func__, debug_flag.bits.conloglvl); #if 1//defined(FEATURE_AARM_RELEASE_MODE) //GPL_KERNEL SYLEE if(debug_flag.bits.dmterminal) { printk(KERN_INFO "%s: UART ROOT SHELL ON\n", __func__); msm_console_set_terminal_onoff(1); } else { printk(KERN_INFO "%s: UART ROOT SHELL OFF\n", __func__); msm_console_set_terminal_onoff(0); } #endif r = msm_nv_write(NV_SPARE_1_I, (nv_cmd_item_type *)&debug_flag.bytes); if (r != NV_DONE_S) { // minus : RPC error, plus : NV error printk(KERN_ERR "%s: msm_nv_write error(%d)\n", __func__, r); return; } }