Merge changes for austin to form mt8127-common
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,8 +4,8 @@ include $(srctree)/drivers/misc/mediatek/Makefile.custom
|
||||
ifneq ($(CONFIG_ARCH_MTK_PROJECT),)
|
||||
ARCH_MTK_PROJECT := $(shell echo $(CONFIG_ARCH_MTK_PROJECT))
|
||||
obj-y += core/
|
||||
ifeq ($(CONFIG_abc123_PROJECT),y)
|
||||
obj-y += dct/dct_abc123/
|
||||
ifeq ($(CONFIG_AUSTIN_PROJECT),y)
|
||||
obj-y += dct/dct_austin/
|
||||
else
|
||||
obj-y += dct/dct/
|
||||
endif
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
include $(srctree)/drivers/misc/mediatek/Makefile.custom
|
||||
|
||||
obj-y := pmic_drv.o
|
||||
|
||||
BIN
Binary file not shown.
+15
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#ifndef __CUST_AUXADC_TOOL_H
|
||||
#define __CUST_AUXADC_TOOL_H
|
||||
|
||||
|
||||
|
||||
|
||||
#endif //_CUST_AUXADC_TOOL_H
|
||||
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Generated by MTK SP DrvGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Tue Apr 07 23:26:37 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#ifndef __CUST_EINTH
|
||||
#define __CUST_EINTH
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define CUST_EINTF_TRIGGER_RISING 1 //High Polarity and Edge Sensitive
|
||||
#define CUST_EINTF_TRIGGER_FALLING 2 //Low Polarity and Edge Sensitive
|
||||
#define CUST_EINTF_TRIGGER_HIGH 4 //High Polarity and Level Sensitive
|
||||
#define CUST_EINTF_TRIGGER_LOW 8 //Low Polarity and Level Sensitive
|
||||
#define CUST_EINT_DEBOUNCE_DISABLE 0
|
||||
#define CUST_EINT_DEBOUNCE_ENABLE 1
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#define CUST_EINT_KPD_SLIDE_NUM 0
|
||||
#define CUST_EINT_KPD_SLIDE_DEBOUNCE_CN 0
|
||||
#define CUST_EINT_KPD_SLIDE_TYPE CUST_EINTF_TRIGGER_LOW
|
||||
#define CUST_EINT_KPD_SLIDE_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_GSE_1_NUM 1
|
||||
#define CUST_EINT_GSE_1_DEBOUNCE_CN 0
|
||||
#define CUST_EINT_GSE_1_TYPE CUST_EINTF_TRIGGER_HIGH
|
||||
#define CUST_EINT_GSE_1_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_ACCDET_NUM 4
|
||||
#define CUST_EINT_ACCDET_DEBOUNCE_CN 256
|
||||
#define CUST_EINT_ACCDET_TYPE CUST_EINTF_TRIGGER_LOW
|
||||
#define CUST_EINT_ACCDET_DEBOUNCE_EN CUST_EINT_DEBOUNCE_ENABLE
|
||||
|
||||
#define CUST_EINT_MSDC1_INS_NUM 6
|
||||
#define CUST_EINT_MSDC1_INS_DEBOUNCE_CN 0
|
||||
#define CUST_EINT_MSDC1_INS_TYPE CUST_EINTF_TRIGGER_HIGH
|
||||
#define CUST_EINT_MSDC1_INS_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_TOUCH_PANEL_NUM 7
|
||||
#define CUST_EINT_TOUCH_PANEL_DEBOUNCE_CN 1
|
||||
#define CUST_EINT_TOUCH_PANEL_TYPE CUST_EINTF_TRIGGER_FALLING
|
||||
#define CUST_EINT_TOUCH_PANEL_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_GSE_2_NUM 10
|
||||
#define CUST_EINT_GSE_2_DEBOUNCE_CN 0
|
||||
#define CUST_EINT_GSE_2_TYPE CUST_EINTF_TRIGGER_HIGH
|
||||
#define CUST_EINT_GSE_2_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_MSE_NUM 11
|
||||
#define CUST_EINT_MSE_DEBOUNCE_CN 0
|
||||
#define CUST_EINT_MSE_TYPE CUST_EINTF_TRIGGER_LOW
|
||||
#define CUST_EINT_MSE_DEBOUNCE_EN CUST_EINT_DEBOUNCE_DISABLE
|
||||
|
||||
#define CUST_EINT_MT6323_PMIC_NUM 24
|
||||
#define CUST_EINT_MT6323_PMIC_DEBOUNCE_CN 1
|
||||
#define CUST_EINT_MT6323_PMIC_TYPE CUST_EINTF_TRIGGER_HIGH
|
||||
#define CUST_EINT_MT6323_PMIC_DEBOUNCE_EN CUST_EINT_DEBOUNCE_ENABLE
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif //_CUST_EINT_H
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Generated by MTK SP DrvGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#ifndef __CUST_EINTH
|
||||
#define __CUST_EINTH
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CUST_EINTF_TRIGGER_RISING 1 //High Polarity and Edge Sensitive
|
||||
#define CUST_EINTF_TRIGGER_FALLING 2 //Low Polarity and Edge Sensitive
|
||||
#define CUST_EINTF_TRIGGER_HIGH 4 //High Polarity and Level Sensitive
|
||||
#define CUST_EINTF_TRIGGER_LOW 8 //Low Polarity and Level Sensitive
|
||||
|
||||
#define CUST_EINT_DEBOUNCE_DISABLE 0
|
||||
#define CUST_EINT_DEBOUNCE_ENABLE 1
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif //_CUST_EINT__EXT_H
|
||||
|
||||
|
||||
+1348
File diff suppressed because it is too large
Load Diff
+138
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#ifndef __CUST_GPIO_USAGE_H__
|
||||
#define __CUST_GPIO_USAGE_H__
|
||||
|
||||
|
||||
#define GPIO_PMIC_EINT_PIN (GPIO2 | 0x80000000)
|
||||
#define GPIO_PMIC_EINT_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_PMIC_EINT_PIN_M_EINT GPIO_PMIC_EINT_PIN_M_GPIO
|
||||
|
||||
#define GPIO_AUD_CLK_MOSI_PIN (GPIO7 | 0x80000000)
|
||||
#define GPIO_AUD_CLK_MOSI_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_AUD_CLK_MOSI_PIN_M_CLK GPIO_MODE_01
|
||||
|
||||
#define GPIO_AUD_DAT_MISO_PIN (GPIO8 | 0x80000000)
|
||||
#define GPIO_AUD_DAT_MISO_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_AUD_DAT_MISO_PIN_M_AUD_MISO GPIO_MODE_01
|
||||
|
||||
#define GPIO_AUD_DAT_MOSI_PIN (GPIO9 | 0x80000000)
|
||||
#define GPIO_AUD_DAT_MOSI_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_AUD_DAT_MOSI_PIN_M_AUD_MOSI GPIO_MODE_01
|
||||
|
||||
#define GPIO_QWERTYSLIDE_EINT_PIN (GPIO22 | 0x80000000)
|
||||
#define GPIO_QWERTYSLIDE_EINT_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_QWERTYSLIDE_EINT_PIN_M_PWM GPIO_MODE_01
|
||||
#define GPIO_QWERTYSLIDE_EINT_PIN_M_EINT GPIO_QWERTYSLIDE_EINT_PIN_M_GPIO
|
||||
|
||||
#define GPIO_ACCDET_EINT_PIN (GPIO26 | 0x80000000)
|
||||
#define GPIO_ACCDET_EINT_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_ACCDET_EINT_PIN_M_CLK GPIO_MODE_01
|
||||
#define GPIO_ACCDET_EINT_PIN_M_EINT GPIO_ACCDET_EINT_PIN_M_GPIO
|
||||
#define GPIO_ACCDET_EINT_PIN_CLK CLK_OUT2
|
||||
#define GPIO_ACCDET_EINT_PIN_FREQ GPIO_CLKSRC_NONE
|
||||
|
||||
#define GPIO_OTG_DRVVBUS_PIN (GPIO27 | 0x80000000)
|
||||
#define GPIO_OTG_DRVVBUS_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_OTG_DRVVBUS_PIN_M_KCOL GPIO_MODE_06
|
||||
|
||||
#define GPIO_CTP_EINT_PIN (GPIO29 | 0x80000000)
|
||||
#define GPIO_CTP_EINT_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_CTP_EINT_PIN_M_EINT GPIO_CTP_EINT_PIN_M_GPIO
|
||||
|
||||
#define GPIO_SPEAKER_EN_PIN (GPIO30 | 0x80000000)
|
||||
#define GPIO_SPEAKER_EN_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_SPEAKER_EN_PIN_M_CLK GPIO_MODE_02
|
||||
#define GPIO_SPEAKER_EN_PIN_CLK CLK_OUT3
|
||||
#define GPIO_SPEAKER_EN_PIN_FREQ GPIO_CLKSRC_NONE
|
||||
|
||||
#define GPIO_KPD_KCOL0_PIN (GPIO36 | 0x80000000)
|
||||
#define GPIO_KPD_KCOL0_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_KPD_KCOL0_PIN_M_KCOL GPIO_MODE_01
|
||||
|
||||
#define GPIO_KPD_KCOL1_PIN (GPIO37 | 0x80000000)
|
||||
#define GPIO_KPD_KCOL1_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_KPD_KCOL1_PIN_M_KCOL GPIO_MODE_01
|
||||
|
||||
#define GPIO_OTG_IDDIG_EINT_PIN (GPIO38 | 0x80000000)
|
||||
#define GPIO_OTG_IDDIG_EINT_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_OTG_IDDIG_EINT_PIN_M_KCOL GPIO_MODE_01
|
||||
#define GPIO_OTG_IDDIG_EINT_PIN_M_IDDIG GPIO_MODE_02
|
||||
|
||||
#define GPIO_CTP_RST_PIN (GPIO45 | 0x80000000)
|
||||
#define GPIO_CTP_RST_PIN_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_CAMERA_CMRST_PIN (GPIO53 | 0x80000000)
|
||||
#define GPIO_CAMERA_CMRST_PIN_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_CAMERA_CMPDN1_PIN (GPIO54 | 0x80000000)
|
||||
#define GPIO_CAMERA_CMPDN1_PIN_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_CAMERA_CMRST1_PIN (GPIO55 | 0x80000000)
|
||||
#define GPIO_CAMERA_CMRST1_PIN_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_CAMERA_CMPDN_PIN (GPIO56 | 0x80000000)
|
||||
#define GPIO_CAMERA_CMPDN_PIN_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_I2C1_SDA_PIN (GPIO57 | 0x80000000)
|
||||
#define GPIO_I2C1_SDA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C1_SDA_PIN_M_SDA GPIO_MODE_01
|
||||
|
||||
#define GPIO_I2C1_SCA_PIN (GPIO58 | 0x80000000)
|
||||
#define GPIO_I2C1_SCA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C1_SCA_PIN_M_SCL GPIO_MODE_01
|
||||
|
||||
#define GPIO_I2C0_SDA_PIN (GPIO75 | 0x80000000)
|
||||
#define GPIO_I2C0_SDA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C0_SDA_PIN_M_SDA GPIO_MODE_01
|
||||
|
||||
#define GPIO_I2C0_SCA_PIN (GPIO76 | 0x80000000)
|
||||
#define GPIO_I2C0_SCA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C0_SCA_PIN_M_SCL GPIO_MODE_01
|
||||
|
||||
#define GPIO_I2C2_SDA_PIN (GPIO77 | 0x80000000)
|
||||
#define GPIO_I2C2_SDA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C2_SDA_PIN_M_PWM GPIO_MODE_02
|
||||
#define GPIO_I2C2_SDA_PIN_M_SDA GPIO_MODE_01
|
||||
|
||||
#define GPIO_I2C2_SCA_PIN (GPIO78 | 0x80000000)
|
||||
#define GPIO_I2C2_SCA_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_I2C2_SCA_PIN_M_PWM GPIO_MODE_02
|
||||
#define GPIO_I2C2_SCA_PIN_M_SCL GPIO_MODE_01
|
||||
|
||||
#define GPIO_UART_URXD1_PIN (GPIO79 | 0x80000000)
|
||||
#define GPIO_UART_URXD1_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_UART_URXD1_PIN_M_URXD GPIO_MODE_01
|
||||
#define GPIO_UART_URXD1_PIN_M_UTXD GPIO_MODE_02
|
||||
|
||||
#define GPIO_UART_UTXD1_PIN (GPIO80 | 0x80000000)
|
||||
#define GPIO_UART_UTXD1_PIN_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_UART_UTXD1_PIN_M_UTXD GPIO_MODE_01
|
||||
#define GPIO_UART_UTXD1_PIN_M_URXD GPIO_MODE_02
|
||||
|
||||
#define GPIO_LCM_PWR (GPIO83 | 0x80000000)
|
||||
#define GPIO_LCM_PWR_M_GPIO GPIO_MODE_00
|
||||
|
||||
#define GPIO_LCM_RST (GPIO89 | 0x80000000)
|
||||
#define GPIO_LCM_RST_M_GPIO GPIO_MODE_00
|
||||
#define GPIO_LCM_RST_M_PWM GPIO_MODE_06
|
||||
|
||||
|
||||
/*Output for default variable names*/
|
||||
/*@XXX_XX_PIN in gpio.cmp */
|
||||
|
||||
|
||||
|
||||
|
||||
/*Output for default variable names*/
|
||||
/*@XXX_XX_PIN in gpio.cmp */
|
||||
|
||||
|
||||
|
||||
#endif /* __CUST_GPIO_USAGE_H__ */
|
||||
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
* Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#ifndef _CUST_KPD_H_
|
||||
#define _CUST_KPD_H_
|
||||
#include <linux/input.h>
|
||||
#include <cust_eint.h>
|
||||
|
||||
#define KPD_YES 1
|
||||
#define KPD_NO 0
|
||||
|
||||
/* available keys (Linux keycodes) */
|
||||
#define KEY_CALL KEY_SEND
|
||||
#define KEY_ENDCALL KEY_END
|
||||
#undef KEY_OK
|
||||
#define KEY_OK KEY_REPLY /* DPAD_CENTER */
|
||||
#define KEY_FOCUS KEY_HP
|
||||
#define KEY_AT KEY_EMAIL
|
||||
#define KEY_POUND 228 //KEY_KBDILLUMTOGGLE
|
||||
#define KEY_STAR 227 //KEY_SWITCHVIDEOMODE
|
||||
#define KEY_DEL KEY_BACKSPACE
|
||||
#define KEY_SYM KEY_COMPOSE
|
||||
/* KEY_HOME */
|
||||
/* KEY_BACK */
|
||||
/* KEY_VOLUMEDOWN */
|
||||
/* KEY_VOLUMEUP */
|
||||
/* KEY_MUTE */
|
||||
/* KEY_MENU */
|
||||
/* KEY_UP */
|
||||
/* KEY_DOWN */
|
||||
/* KEY_LEFT */
|
||||
/* KEY_RIGHT */
|
||||
/* KEY_CAMERA */
|
||||
/* KEY_POWER */
|
||||
/* KEY_TAB */
|
||||
/* KEY_ENTER */
|
||||
/* KEY_LEFTSHIFT */
|
||||
/* KEY_COMMA */
|
||||
/* KEY_DOT */ /* PERIOD */
|
||||
/* KEY_SLASH */
|
||||
/* KEY_LEFTALT */
|
||||
/* KEY_RIGHTALT */
|
||||
/* KEY_SPACE */
|
||||
/* KEY_SEARCH */
|
||||
/* KEY_0 ~ KEY_9 */
|
||||
/* KEY_A ~ KEY_Z */
|
||||
|
||||
/*
|
||||
* Power key's HW keycodes are 8, 17, 26, 35, 44, 53, 62, 71. Only [8] works
|
||||
* for Power key in Keypad driver, so we set KEY_ENDCALL in [8] because
|
||||
* EndCall key is Power key in Android. If KPD_PWRKEY_USE_EINT is YES, these
|
||||
* eight keycodes will not work for Power key.
|
||||
*/
|
||||
|
||||
|
||||
#define KPD_KEY_DEBOUNCE 1024 /* (val / 32) ms */
|
||||
#define KPD_PWRKEY_MAP KEY_POWER
|
||||
#define MTK_PMIC_PWR_KEY 8
|
||||
|
||||
/* HW keycode [0 ~ 71] -> Linux keycode */
|
||||
#define KPD_INIT_KEYMAP() \
|
||||
{ \
|
||||
[0] = KEY_VOLUMEUP, \
|
||||
[1] = KEY_VOLUMEDOWN, \
|
||||
}
|
||||
/*****************************************************************/
|
||||
/*******************Preload Customation***************************/
|
||||
/*****************************************************************/
|
||||
#define KPD_PWRKEY_EINT_GPIO GPIO0
|
||||
|
||||
#define KPD_PWRKEY_GPIO_DIN 0
|
||||
|
||||
#define KPD_DL_KEY1 0 /* KEY_VOLUMEUP */
|
||||
#define KPD_DL_KEY2 1 /* KEY_VOLUMEDOWN */
|
||||
#define KPD_DL_KEY3 8 /* KEY_POWER */
|
||||
/*****************************************************************/
|
||||
/*******************Uboot Customation***************************/
|
||||
/*****************************************************************/
|
||||
#define MT65XX_RECOVERY_KEY 0 /* KEY_VOLUMEUP */
|
||||
#define MT65XX_FACTORY_KEY 1 /* KEY_VOLUMEDOWN */
|
||||
/*****************************************************************/
|
||||
/*******************factory Customation***************************/
|
||||
/*****************************************************************/
|
||||
#define KEYS_PWRKEY_MAP { KEY_POWER, "Power" }
|
||||
#define DEFINE_KEYS_KEYMAP(x) \
|
||||
struct key x[] = { \
|
||||
KEYS_PWRKEY_MAP, \
|
||||
{ KEY_VOLUMEUP, "VLUp" }, \
|
||||
{ KEY_VOLUMEDOWN, "VLDown" }, \
|
||||
}
|
||||
#define CUST_KEY_UP KEY_VOLUMEUP
|
||||
#define CUST_KEY_VOLUP KEY_VOLUMEUP
|
||||
#define CUST_KEY_DOWN KEY_VOLUMEDOWN
|
||||
#define CUST_KEY_VOLDOWN KEY_VOLUMEDOWN
|
||||
#define CUST_KEY_CONFIRM KEY_VOLUMEUP
|
||||
/*****************************************************************/
|
||||
/*******************recovery Customation****************************/
|
||||
/*****************************************************************/
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
* Generated by MTK SP DrvGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
#define GPIO_DVDD28_DPI GPIO_VIO28
|
||||
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "pmic_drv.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//For PMIC driver use
|
||||
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Generated by MTK SP Drv_CodeGen Version 03.13.6 for MT8127. Copyright MediaTek Inc. (C) 2013.
|
||||
* Thu Jan 29 20:42:51 2015
|
||||
* Do Not Modify the File.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <mach/upmu_sw.h>
|
||||
|
||||
|
||||
//****for customer use*******//
|
||||
|
||||
|
||||
//PMIC default enable/disable result
|
||||
|
||||
//PMIC mode select
|
||||
typedef enum
|
||||
{
|
||||
BY_ENABLE = 0,
|
||||
BY_SRCLKEN = 1
|
||||
}MODE_sel_enum;
|
||||
|
||||
////For Common use
|
||||
|
||||
//For PMIC driver use
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
#define LOW_POWER_WAKEUP_PERIOD 300 /*5 * 60 = 5 min*/
|
||||
#define CLOSE_POWEROFF_WAKEUP_PERIOD 30 /*30 s*/
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define CUST_CAPACITY_OCV2CV_TRANSFORM
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -37,7 +37,7 @@
|
||||
|
||||
/* Precise Tunning */
|
||||
#define BATTERY_AVERAGE_DATA_NUMBER 3
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define BATTERY_AVERAGE_SIZE 10
|
||||
#else
|
||||
#define BATTERY_AVERAGE_SIZE 30
|
||||
|
||||
@@ -9,7 +9,7 @@ obj-y += tpd_init.o
|
||||
obj-y += tpd_misc.o
|
||||
obj-y += tpd_setting.o
|
||||
|
||||
ifeq ($(CONFIG_abc123_PROJECT), y)
|
||||
ifeq ($(CONFIG_AUSTIN_PROJECT), y)
|
||||
obj-y += goodix_tool.o
|
||||
obj-y += gt9xx_driver.o
|
||||
obj-y += gt9xx_update.o
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#define SHOW_TOUCH_VENDOR 1
|
||||
#ifdef SHOW_TOUCH_VENDOR
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
#define FT_TPV_ID 0xf2
|
||||
#define FT_OFILM_ID 0x51
|
||||
extern unsigned char ft_vendor_id;
|
||||
@@ -432,7 +432,7 @@ static int tpd_probe(struct platform_device *pdev) {
|
||||
#ifdef SHOW_TOUCH_VENDOR
|
||||
device_create_file(&pdev->dev, &dev_attr_Vendor_Name);
|
||||
vendor_name = g_tpd_drv->tpd_device_name;
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
if(strcmp(vendor_name, "fts") == 0) {
|
||||
if(ft_vendor_id == FT_TPV_ID)
|
||||
vendor_name = "fts_tpv";
|
||||
|
||||
@@ -11,7 +11,7 @@ config MTK_PLATFORM
|
||||
config ARCH_MTK_PROJECT
|
||||
string "MTK project name"
|
||||
|
||||
config abc123_PROJECT
|
||||
config AUSTIN_PROJECT
|
||||
bool "amazon project name"
|
||||
|
||||
config MTK_INTERNAL
|
||||
|
||||
@@ -19,15 +19,15 @@ MTK_PLATFORM_PATH_ROOT := $(srctree)/drivers/misc/mediatek/mach/$(MTK_PLATFORM)
|
||||
MTK_PROJECT_PATH_ROOT := $(srctree)/drivers/misc/mediatek/mach/$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_abc123_PROJECT),y)
|
||||
ifeq ($(CONFIG_AUSTIN_PROJECT),y)
|
||||
ccflags-y += -I$(MTK_PLATFORM_PATH_ROOT)/include \
|
||||
-I$(MTK_PLATFORM_PATH_ROOT)/include/mach \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/accdet \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/core \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/camera/camera \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/common \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/dct/dct_abc123 \
|
||||
-I$(srctree)/arch/arm//mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct_abc123 \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/dct/dct_austin \
|
||||
-I$(srctree)/arch/arm//mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct_austin \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/hdmi \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/imgsensor/inc \
|
||||
-I$(MTK_PROJECT_PATH_ROOT)/keypad \
|
||||
|
||||
@@ -402,7 +402,7 @@ static void accdet_eint_work_callback(struct work_struct *work)
|
||||
eint_accdet_sync_flag = 1;
|
||||
mutex_unlock(&accdet_eint_irq_sync_mutex);
|
||||
#ifdef ACCDET_LOW_POWER
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
mod_timer(&micbias_timer, jiffies + MICBIAS_DISABLE_TIMER);
|
||||
#endif
|
||||
wake_lock_timeout(&accdet_timer_lock, 7*HZ);
|
||||
@@ -447,7 +447,7 @@ static void accdet_eint_work_callback(struct work_struct *work)
|
||||
accdet_auxadc_switch(0);
|
||||
accdet_adc = (arr[4] + arr[5] + arr[6] + arr[7])/4;
|
||||
ACCDET_DEBUG("accdet_voltage = %d mv, board_voltage = %d mv\n", accdet_adc, board_voltage);
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
if (accdet_adc > 550) {
|
||||
ACCDET_DEBUG("[Accdet] ctia headset!!!\n");
|
||||
mt_set_gpio_out(GPIO_HEADSET_SWITCH1, GPIO_OUT_ZERO);
|
||||
@@ -566,7 +566,7 @@ static void accdet_eint_func(void)
|
||||
|
||||
#ifdef ACCDET_LOW_POWER
|
||||
//INIT the timer to disable micbias.
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
init_timer(&micbias_timer);
|
||||
micbias_timer.expires = jiffies + MICBIAS_DISABLE_TIMER;
|
||||
micbias_timer.function = &disable_micbias;
|
||||
@@ -658,7 +658,7 @@ static DEFINE_MUTEX(accdet_multikey_mutex);
|
||||
#define UP_KEY_THR_1 (100) /*100mv*/
|
||||
#define MD_KEY_THR_1 (0)
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
static int key_check(int b)
|
||||
{
|
||||
/*ACCDET_DEBUG("adc_data: %d v\n",b);*/
|
||||
@@ -1830,7 +1830,7 @@ int mt_accdet_probe(void)
|
||||
queue_work(accdet_workqueue, &accdet_work); //schedule a work for the first detection
|
||||
#endif
|
||||
#ifdef ACCDET_EINT
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
setup_timer(&micbias_timer, disable_micbias, (unsigned long) 0);
|
||||
#endif
|
||||
accdet_eint_workqueue = create_singlethread_workqueue("accdet_eint");
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
# kernel build system and can use its language.
|
||||
ifneq ($(KERNELRELEASE),)
|
||||
include $(srctree)/drivers/misc/mediatek/Makefile.custom
|
||||
ifeq ($(CONFIG_abc123_PROJECT),y)
|
||||
subdir-ccflags-y += -I$(srctree)/arch/arm/mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct_abc123
|
||||
ifeq ($(CONFIG_AUSTIN_PROJECT),y)
|
||||
subdir-ccflags-y += -I$(srctree)/arch/arm/mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct_austin
|
||||
else
|
||||
subdir-ccflags-y += -I$(srctree)/arch/arm/mach-$(MTK_PLATFORM)/$(ARCH_MTK_PROJECT)/dct/dct
|
||||
endif
|
||||
|
||||
+4
-4
@@ -700,9 +700,9 @@ int g_u4P2POnOffing = 0;
|
||||
#define IDME_OF_WIFI_MFG "/proc/idme/wifi_mfg"
|
||||
#define IDME_OF_BOARD_ID "/proc/idme/board_id"
|
||||
#endif
|
||||
#define BOARD_ID_abc123_STR "0031"
|
||||
#define BOARD_ID_abf123_STR "0031"
|
||||
#define BOARD_ID_BISCUIT_STR "0110"
|
||||
#define BOARD_ID_abc123_STR "0037"
|
||||
#define BOARD_ID_AUSTIN_STR "0037"
|
||||
char idme_board_id[16];
|
||||
|
||||
|
||||
@@ -1065,7 +1065,7 @@ static COUNTRY_POWER_TABLE asCountryPwrTbl[] = {
|
||||
0x1, 0x21, 0x21), /* 5G band edge */
|
||||
};
|
||||
|
||||
static COUNTRY_POWER_TABLE power_table_abc123[] = {
|
||||
static COUNTRY_POWER_TABLE power_table_abf123[] = {
|
||||
COUNTRY_PWR_TBL("WW", /* country code */
|
||||
0x1C, /* CCK */
|
||||
0x1C, 0x1C, 0x1C, 0x1C, 0x1C, /* OFDM */
|
||||
@@ -1160,7 +1160,7 @@ static COUNTRY_POWER_TABLE power_table_biscuit[] = {
|
||||
};
|
||||
|
||||
struct board_id_power_table_map board_id_power_table_list[] = {
|
||||
{BOARD_ID_abc123_STR, power_table_abc123, ARRAY_SIZE(power_table_abc123)},
|
||||
{BOARD_ID_abf123_STR, power_table_abf123, ARRAY_SIZE(power_table_abf123)},
|
||||
{BOARD_ID_BISCUIT_STR, power_table_biscuit, ARRAY_SIZE(power_table_biscuit)},
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include <cust_leds.h>
|
||||
#include <cust_leds_def.h>
|
||||
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
#define DDP_GAMMA_SUPPORT
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@ static int gBLSMutexID = 3;
|
||||
static int gBLSPowerOn = 0;
|
||||
#endif
|
||||
static int gMaxLevel = 1023;
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
static int gMinLevel = 100;
|
||||
#else
|
||||
static int gMinLevel = 20;
|
||||
|
||||
@@ -133,7 +133,7 @@ static int init_board_id(void)
|
||||
board_id.voltage = (voltage * 1500) / 4096;
|
||||
/* MTK's suggestion we convert to a valid voltage */
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
if (board_id.voltage < 150) { /* HVT 0V */
|
||||
board_id.built_name = "HVT";
|
||||
board_id.id = "0037001010000017";
|
||||
|
||||
@@ -5,7 +5,7 @@ ifeq ($(ARCH_MTK_PROJECT), tb27A1910)
|
||||
obj-y += gc0312yuv_Sensor.o
|
||||
else
|
||||
ifeq ($(ARCH_MTK_PROJECT), ford)
|
||||
ifeq ($(CONFIG_abc123_PROJECT), y)
|
||||
ifeq ($(CONFIG_AUSTIN_PROJECT), y)
|
||||
obj-y += sp2509mipiraw_Sensor.o
|
||||
obj-y += gc2355mipiraw_huaquan_Sensor.o
|
||||
obj-y += sp0a19raw_Sensor.o
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <linux/of_irq.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
@@ -318,7 +318,7 @@ static enum hrtimer_restart aee_timer_5s_func(struct hrtimer *timer)
|
||||
/************************************************************************************************************************************************/
|
||||
|
||||
#if KPD_HAS_SLIDE_QWERTY
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int slide_st = 0;
|
||||
#endif
|
||||
static void kpd_slide_handler(unsigned long data)
|
||||
@@ -333,7 +333,7 @@ static void kpd_slide_handler(unsigned long data)
|
||||
input_sync(kpd_input_dev);
|
||||
kpd_print("report QWERTY = %s\n", slid ? "slid" : "closed");
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
slide_st = slid;
|
||||
#endif
|
||||
if (old_state) {
|
||||
@@ -806,7 +806,7 @@ static int kpd_open(struct input_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static ssize_t proc_hall_show(struct seq_file *m, char *page, size_t count, loff_t *f_ops)
|
||||
{
|
||||
int status = slide_st;
|
||||
@@ -881,7 +881,7 @@ static int kpd_pdrv_probe(struct platform_device *pdev)
|
||||
|
||||
kpd_ldvt_test_init(); /* API 2 for kpd LFVT test enviroment settings */
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
hall_create_proc_entry();
|
||||
#endif
|
||||
/* initialize and register input device (/dev/input/eventX) */
|
||||
|
||||
@@ -1428,7 +1428,7 @@ void mt_mt65xx_led_set(struct led_classdev *led_cdev, enum led_brightness level)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifndef CONFIG_abc123_PROJECT
|
||||
#ifndef CONFIG_AUSTIN_PROJECT
|
||||
int a, b;
|
||||
if(lcmindex==1) {/*TXD LCM*/
|
||||
//map 5~255 to 100 ~ 934
|
||||
|
||||
@@ -284,7 +284,7 @@ static void msdc_metrics_work(struct work_struct *work)
|
||||
#define MSDC_MAX_W_TIMEOUT_TUNE (5)
|
||||
#define MSDC_MAX_W_TIMEOUT_TUNE_EMMC (64)
|
||||
#define MSDC_MAX_R_TIMEOUT_TUNE (3)
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define MSDC_MAX_POWER_CYCLE (80)
|
||||
#else
|
||||
#define MSDC_MAX_POWER_CYCLE (3)
|
||||
@@ -2206,7 +2206,7 @@ static u32 msdc_power_tuning(struct msdc_host *host)
|
||||
}
|
||||
host->sw_timeout = sw_timeout;
|
||||
host->error = host_err;
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
if(!ret)
|
||||
host->power_cycle = 0;
|
||||
else
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include <mach/battery_common.h>
|
||||
#include <linux/time.h>
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
#ifdef CONFIG_MTK_BQ24296_SUPPORT
|
||||
#include "bq24296.h"
|
||||
#endif
|
||||
@@ -247,7 +247,7 @@ CHARGER_TYPE hw_charger_type_detection(void)
|
||||
{
|
||||
CHARGER_TYPE ret = CHARGER_UNKNOWN;
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
#ifdef CONFIG_MTK_BQ24296_SUPPORT
|
||||
bq24296_set_vindpm(0x9); /*VIN DPM check 4.6V*/
|
||||
#endif
|
||||
|
||||
@@ -184,7 +184,7 @@ static int mtktsbattery_set_trip_temp(struct thermal_zone_device *thermal,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int mtktsbattery_thermal_notify(struct thermal_zone_device *thermal,
|
||||
int trip, enum thermal_trip_type type)
|
||||
{
|
||||
@@ -204,7 +204,7 @@ static struct thermal_zone_device_ops mtktsbattery_dev_ops = {
|
||||
.get_trip_temp = mtktsbattery_get_trip_temp,
|
||||
.get_crit_temp = mtktsbattery_get_crit_temp,
|
||||
.set_trip_temp = mtktsbattery_set_trip_temp,
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
.notify = mtktsbattery_thermal_notify,
|
||||
#endif
|
||||
};
|
||||
@@ -235,7 +235,7 @@ static struct thermal_dev_ops mtktsbattery_fops = {
|
||||
.get_temp = mtktsbattery_read_temp,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
struct thermal_dev_params mtktsbattery_tdp = {
|
||||
.offset = -13000,
|
||||
.alpha = 7,
|
||||
|
||||
@@ -388,7 +388,7 @@ static int mtkts_bts_get_crit_temp(struct thermal_zone_device *thermal, unsigned
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int mtkts_bts_thermal_notify(struct thermal_zone_device *thermal,
|
||||
int trip, enum thermal_trip_type type)
|
||||
{
|
||||
@@ -409,14 +409,14 @@ static struct thermal_zone_device_ops mtkts_bts_dev_ops = {
|
||||
.get_trip_temp = mtkts_bts_get_trip_temp,
|
||||
.set_trip_temp = mtkts_bts_set_trip_temp,
|
||||
.get_crit_temp = mtkts_bts_get_crit_temp,
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
.notify = mtkts_bts_thermal_notify,
|
||||
#endif
|
||||
};
|
||||
|
||||
/* =========== bts thermal param handling ========== */
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
struct thermal_dev_params mtkts_bts_tdp = {
|
||||
.offset = -2500,
|
||||
.alpha = 15,
|
||||
|
||||
@@ -930,7 +930,7 @@ static int mtktscpu_set_trip_hyst(struct thermal_zone_device *thermal,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int mtktscpu_thermal_notify(struct thermal_zone_device *thermal,
|
||||
int trip, enum thermal_trip_type type)
|
||||
{
|
||||
@@ -954,7 +954,7 @@ static struct thermal_zone_device_ops mtktscpu_dev_ops = {
|
||||
.get_crit_temp = mtktscpu_get_crit_temp,
|
||||
.get_trip_hyst = mtktscpu_get_trip_hyst,
|
||||
.set_trip_hyst = mtktscpu_set_trip_hyst,
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
.notify = mtktscpu_thermal_notify,
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -271,7 +271,7 @@ static int mtktspmic_get_crit_temp(struct thermal_zone_device *thermal, unsigned
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int mtktspmic_thermal_notify(struct thermal_zone_device *thermal,
|
||||
int trip, enum thermal_trip_type type)
|
||||
{
|
||||
@@ -291,7 +291,7 @@ static struct thermal_zone_device_ops mtktspmic_dev_ops = {
|
||||
.get_trip_temp = mtktspmic_get_trip_temp,
|
||||
.set_trip_temp = mtktspmic_set_trip_temp,
|
||||
.get_crit_temp = mtktspmic_get_crit_temp,
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
.notify = mtktspmic_thermal_notify,
|
||||
#endif
|
||||
};
|
||||
@@ -321,7 +321,7 @@ static struct thermal_dev_ops mtktspmic_fops = {
|
||||
.get_temp = mtktspmic_read_temp,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
struct thermal_dev_params mtktspmic_tdp = {
|
||||
.offset = 14500,
|
||||
.alpha = 4,
|
||||
|
||||
@@ -150,7 +150,7 @@ static int mtktswmt_get_crit_temp(struct thermal_zone_device *thermal, unsigned
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
static int mtktswmt_thermal_notify(struct thermal_zone_device *thermal,
|
||||
int trip, enum thermal_trip_type type)
|
||||
{
|
||||
@@ -170,7 +170,7 @@ static struct thermal_zone_device_ops mtktswmt_dev_ops = {
|
||||
.get_trip_temp = mtktswmt_get_trip_temp,
|
||||
.set_trip_temp = mtktswmt_set_trip_temp,
|
||||
.get_crit_temp = mtktswmt_get_crit_temp,
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
.notify = mtktswmt_thermal_notify,
|
||||
#endif
|
||||
};
|
||||
@@ -204,7 +204,7 @@ static struct thermal_dev_ops mtktswmt_fops = {
|
||||
.get_temp = mtktswmt_read_temp,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
struct thermal_dev_params mtktswmt_tdp = {
|
||||
.offset = -4000,
|
||||
.alpha = 1000,
|
||||
|
||||
@@ -310,7 +310,7 @@ void mt_usb_disconnect(void)
|
||||
|
||||
bool usb_cable_connected(void)
|
||||
{
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
int i = 0;
|
||||
#endif
|
||||
#ifdef FPGA_PLATFORM
|
||||
@@ -323,7 +323,7 @@ bool usb_cable_connected(void)
|
||||
|
||||
iddig_state = mt_get_gpio_in(GPIO_OTG_IDDIG_EINT_PIN);
|
||||
DBG(0, "iddig_state = %d\n", iddig_state);
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
for (i=0; i<3; i++) {
|
||||
if (likely(iddig_state)) {
|
||||
break;
|
||||
|
||||
@@ -148,7 +148,7 @@ static bool musb_is_host(void)
|
||||
u8 devctl = 0;
|
||||
int iddig_state = 1;
|
||||
bool usb_is_host = 0;
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
int i = 0;
|
||||
#endif
|
||||
|
||||
@@ -167,7 +167,7 @@ static bool musb_is_host(void)
|
||||
/* iddig_state = mt_get_gpio_in(GPIO38); */
|
||||
iddig_state = mt_get_gpio_in(GPIO_OTG_IDDIG_EINT_PIN);
|
||||
DBG(0,"iddig_state = %d\n", iddig_state);
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
for (i=0; i<3; i++) {
|
||||
if (likely(iddig_state)) {
|
||||
break;
|
||||
@@ -283,7 +283,7 @@ static void musb_id_pin_work(struct work_struct *data)
|
||||
DBG(0, "do nothing due to in_ipo_off\n");
|
||||
goto out;
|
||||
}
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
wake_lock(&mtk_musb->usb_lock);
|
||||
#endif
|
||||
mtk_musb ->is_host = musb_is_host();
|
||||
@@ -296,7 +296,7 @@ static void musb_id_pin_work(struct work_struct *data)
|
||||
#endif
|
||||
//setup fifo for host mode
|
||||
ep_config_from_table_for_host(mtk_musb);
|
||||
#if CONFIG_abc123_PROJECT
|
||||
#if CONFIG_AUSTIN_PROJECT
|
||||
if (!wake_lock_active(&mtk_musb->usb_lock))
|
||||
wake_lock(&mtk_musb->usb_lock);
|
||||
#else
|
||||
|
||||
@@ -152,7 +152,7 @@ static char *DISO_state_s[8] = {
|
||||
/* ///////////////////////////////////////////////////////////////////////////////////////// */
|
||||
/* // Thermal related flags */
|
||||
/* ///////////////////////////////////////////////////////////////////////////////////////// */
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
int g_battery_thermal_throttling_flag = 1; /* 0:nothing, 1:enable batTT&chrTimer, 2:disable batTT&chrTimer, 3:enable batTT, disable chrTimer */
|
||||
#else
|
||||
int g_battery_thermal_throttling_flag = 3; /* 0:nothing, 1:enable batTT&chrTimer, 2:disable batTT&chrTimer, 3:enable batTT, disable chrTimer */
|
||||
@@ -196,7 +196,7 @@ extern U32 suspend_time;
|
||||
#define SYSTEM_OFF_VOLTAGE CUST_SYSTEM_OFF_VOLTAGE
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
int battery_idV = 0;
|
||||
extern int IMM_GetOneChannelValue(int dwChannel, int data[4], int* rawdata);
|
||||
|
||||
@@ -276,7 +276,7 @@ static int cmd_discharging = -1;
|
||||
static int adjust_power = -1;
|
||||
static int suspend_discharging = -1;
|
||||
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
|
||||
struct metrics_charge {
|
||||
struct timespec charger_time;
|
||||
@@ -406,14 +406,14 @@ static enum power_supply_property battery_props[] = {
|
||||
/* ACOS_MOD_END {metrics_log} */
|
||||
};
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define SHOW_CHARGE_IC_VENDOR
|
||||
static char *charge_ic_vendor_name = NULL;
|
||||
static char *battery_vendor_name = NULL;
|
||||
extern kal_uint32 g_fg_battery_id;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
void metrics_battery_save_data(void)
|
||||
{
|
||||
unsigned long temp = get_virtualsensor_temp();
|
||||
@@ -596,7 +596,7 @@ static void metrics_handle(void)
|
||||
|
||||
mutex_unlock(&info->lock);
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
battery_capacity_check();
|
||||
#endif
|
||||
|
||||
@@ -2018,8 +2018,8 @@ static ssize_t store_Custom_Charging_Current(struct device *dev, struct device_a
|
||||
static DEVICE_ATTR(Custom_Charging_Current, 0664, show_Custom_Charging_Current,
|
||||
store_Custom_Charging_Current);
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
static ssize_t show_Custom_Charging_Mode(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
@@ -2797,7 +2797,7 @@ void mt_battery_GetBatteryData(void)
|
||||
|
||||
}
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
static PMU_STATUS mt_battery_CheckBatteryConnect(void)
|
||||
{
|
||||
PMU_STATUS status = PMU_STATUS_OK;
|
||||
@@ -2951,7 +2951,7 @@ static void mt_battery_CheckBatteryStatus(void)
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
if (mt_battery_CheckBatteryConnect() != PMU_STATUS_OK) {
|
||||
BMT_status.bat_charging_state = CHR_ERROR;
|
||||
return;
|
||||
@@ -3206,7 +3206,7 @@ static void mt_battery_thermal_check(void)
|
||||
|
||||
}
|
||||
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
static void battery_charge_metric(void)
|
||||
{
|
||||
unsigned long virtual_temp = get_virtualsensor_temp();
|
||||
@@ -3322,7 +3322,7 @@ static void mt_battery_update_status(void)
|
||||
usb_update(&usb_main);
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG)
|
||||
metrics_charger_update(ac_main.AC_ONLINE, usb_main.USB_ONLINE);
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
battery_charge_metric();
|
||||
#endif
|
||||
#endif
|
||||
@@ -3622,7 +3622,7 @@ void BAT_thread(void)
|
||||
static kal_bool battery_meter_initilized = KAL_FALSE;
|
||||
struct timespec now_time;
|
||||
unsigned long total_time_plug_in;
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
char buf[256] = {0};
|
||||
unsigned long virtual_temp = get_virtualsensor_temp();
|
||||
static bool bat_14days_flag;
|
||||
@@ -3653,7 +3653,7 @@ void BAT_thread(void)
|
||||
|
||||
if (total_time_plug_in > PLUGIN_THRESHOLD) {
|
||||
g_custom_charging_cv = BATTERY_VOLT_04_100000_V;
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
if (!bat_14days_flag) {
|
||||
bat_14days_flag = true;
|
||||
snprintf(buf, sizeof(buf),
|
||||
@@ -3674,7 +3674,7 @@ void BAT_thread(void)
|
||||
else
|
||||
g_custom_charging_cv = -1;
|
||||
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AMAZON_METRICS_LOG) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
if (g_custom_charging_mode == 1 && !bat_demo_flag) {
|
||||
bat_demo_flag = true;
|
||||
snprintf(buf, sizeof(buf),
|
||||
@@ -4327,7 +4327,7 @@ static int battery_probe(struct platform_device *dev)
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_Charger_Type);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_Custom_PlugIn_Time);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_Custom_Charging_Current);
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_Custom_Charging_Mode);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_ChargeIC_Vendor_Name);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_Battery_Vendor_Name);
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include <mach/battery_meter.h>
|
||||
#include <mach/battery_meter_hal.h>
|
||||
#include "cust_battery_meter.h"
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#include "cust_battery_meter_table_abc123.h"
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#include "cust_battery_meter_table_austin.h"
|
||||
#else
|
||||
#include "cust_battery_meter_table.h"
|
||||
#endif
|
||||
@@ -65,7 +65,7 @@ static kal_int32 cv_current = 4000; /* 400mA */
|
||||
static kal_int32 g_currentfactor = 100;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
#define MAX_BATTERY_CYCLE 500
|
||||
#define MAX_AGING_COLUMB_THRES 3300 /*3300mah*/
|
||||
@@ -137,7 +137,7 @@ kal_int32 g_fg_dbg_bat_current = 0;
|
||||
kal_int32 g_fg_dbg_bat_zcv = 0;
|
||||
kal_int32 g_fg_dbg_bat_temp = 0;
|
||||
kal_int32 g_fg_dbg_bat_r = 0;
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
kal_int32 g_fg_dbg_bat_offset_r = 0;
|
||||
#endif
|
||||
kal_int32 g_fg_dbg_bat_car = 0;
|
||||
@@ -230,7 +230,7 @@ static kal_int32 columb_before_sleep = 0x123456;
|
||||
#endif /* aging mechanism */
|
||||
|
||||
/* battery info */
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
|
||||
kal_int32 gFG_battery_cycle = 0;
|
||||
@@ -253,7 +253,7 @@ extern char* saved_command_line;
|
||||
|
||||
#define MTK_MULTI_BAT_PROFILE_SUPPORT
|
||||
#define MTK_GET_BATTERY_ID_BY_AUXADC
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define ADC_BOARD_ID (13)
|
||||
#define TOTAL_BATTERY_NUMBER 2
|
||||
kal_int32 g_battery_id_voltage[] = {200, 500};/*0~0.2V ATL; 0.2v~5V XWD*/
|
||||
@@ -269,7 +269,7 @@ extern int IMM_GetOneChannelValue(int dwChannel, int data[4], int* rawdata);
|
||||
|
||||
kal_uint32 g_fg_battery_id = 0;
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
kal_int32 g_Q_MAX_POS_50[] = {2963, 2929};
|
||||
kal_int32 g_Q_MAX_POS_25[] = {3000, 2918};
|
||||
kal_int32 g_Q_MAX_POS_0[] = {3047, 3032};
|
||||
@@ -289,7 +289,7 @@ kal_int32 g_Q_MAX_POS_0_H_CURRENT[] = {2372, 2746};
|
||||
kal_int32 g_Q_MAX_NEG_10_H_CURRENT[] = {1946, 1614};
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
kal_int32 g_Q_MAX_POS_50_0cycle[] = {2963, 2980};
|
||||
kal_int32 g_Q_MAX_POS_25_0cycle[] = {3000, 3022};
|
||||
@@ -1309,7 +1309,7 @@ void update_qmax_by_cycle(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
#if defined(BATTERY_AGING_DEBUG)
|
||||
static void dump_battery_cycle_table(void)
|
||||
@@ -2152,7 +2152,7 @@ void oam_run(void)
|
||||
oam_i_1 = (((oam_v_ocv_1 - vol_bat) * 1000) * 10) / oam_r_1; /* 0.1mA */
|
||||
oam_i_2 = (((oam_v_ocv_2 - vol_bat) * 1000) * 10) / oam_r_2; /* 0.1mA */
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
if(oam_i_2 < 0) {
|
||||
charging_current = get_charging_setting_current()/10;
|
||||
if (abs(oam_i_2) > charging_current) {
|
||||
@@ -2190,7 +2190,7 @@ void oam_run(void)
|
||||
|
||||
oam_v_ocv_2 = fgauge_read_v_by_d(oam_d_2);
|
||||
oam_r_2 = fgauge_read_r_bat_by_v(oam_v_ocv_2);
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
oam_r_2 = oam_r_2 + g_fg_dbg_bat_offset_r;
|
||||
#endif
|
||||
#if 0
|
||||
@@ -2325,7 +2325,7 @@ void oam_run(void)
|
||||
fgauge_get_current_factor();
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
fgauge_aging_algorithm();
|
||||
#endif
|
||||
@@ -3060,7 +3060,7 @@ kal_int32 battery_meter_get_battery_voltage(kal_bool update)
|
||||
}
|
||||
g_sw_vbat_temp = val;
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
if (g_sw_vbat_temp > gFG_max_voltage) {
|
||||
gFG_max_voltage = g_sw_vbat_temp;
|
||||
@@ -3228,7 +3228,7 @@ kal_int32 battery_meter_get_car(void)
|
||||
|
||||
kal_int32 battery_meter_get_battery_temperature(void)
|
||||
{
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
kal_int32 batt_temp = force_get_tbat(KAL_TRUE);
|
||||
|
||||
@@ -3424,7 +3424,7 @@ void reset_parameter_car(void)
|
||||
oam_car_2 = 0;
|
||||
gFG_columb = 0;
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
gFG_pre_columb_count = -1;
|
||||
#endif
|
||||
@@ -3636,7 +3636,7 @@ int init_proc_log_fg(void)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
|
||||
/* ============================================================ // */
|
||||
@@ -3982,7 +3982,7 @@ static ssize_t store_FG_g_fg_dbg_bat_r(struct device *dev, struct device_attribu
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(FG_g_fg_dbg_bat_r, 0664, show_FG_g_fg_dbg_bat_r, store_FG_g_fg_dbg_bat_r);
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
/* ------------------------------------------------------------------------------------------- */
|
||||
static ssize_t show_FG_g_fg_dbg_bat_offset_r(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
@@ -4148,7 +4148,7 @@ static int battery_meter_probe(struct platform_device *dev)
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_bat_zcv);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_bat_temp);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_bat_r);
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_bat_offset_r);
|
||||
#endif
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_bat_car);
|
||||
@@ -4160,7 +4160,7 @@ static int battery_meter_probe(struct platform_device *dev)
|
||||
ret_device_file =
|
||||
device_create_file(&(dev->dev), &dev_attr_FG_g_fg_dbg_percentage_voltmode);
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT) \
|
||||
#if defined(CONFIG_AUSTIN_PROJECT) \
|
||||
&& defined(CONFIG_MTK_BATTERY_LIFETIME_DATA_SUPPORT)
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_Battery_Cycle);
|
||||
ret_device_file = device_create_file(&(dev->dev), &dev_attr_FG_Aging_Factor);
|
||||
|
||||
@@ -96,7 +96,7 @@ kal_bool temp_error_recovery_chr_flag = KAL_TRUE;
|
||||
/* extern variable */
|
||||
/* ============================================================ // */
|
||||
extern int g_platform_boot_mode;
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
extern int battery_idV;
|
||||
#endif
|
||||
|
||||
@@ -334,7 +334,7 @@ static BATTERY_VOLTAGE_ENUM select_jeita_cv(void)
|
||||
if (g_custom_charging_cv != -1)
|
||||
cv_voltage = g_custom_charging_cv;
|
||||
|
||||
#if defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_AUSTIN_PROJECT)
|
||||
if (g_custom_charging_mode) /* For demo unit */
|
||||
cv_voltage = BATTERY_VOLT_04_100000_V;
|
||||
#endif
|
||||
@@ -504,7 +504,7 @@ void select_charging_curret_bcct(void)
|
||||
}
|
||||
|
||||
g_temp_CC_value = g_bcct_value*100;
|
||||
#if defined(CONFIG_MTK_JEITA_STANDARD_SUPPORT) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_MTK_JEITA_STANDARD_SUPPORT) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
if(g_temp_CC_value > CHARGE_CURRENT_300_00_MA)
|
||||
set_jeita_charging_current();
|
||||
#endif
|
||||
@@ -870,7 +870,7 @@ PMU_STATUS BAT_BatteryStatusFailAction(void)
|
||||
|
||||
battery_xlog_printk(BAT_LOG_CRTI, "[BATTERY] BAD Battery status... Charging Stop !!\n\r");
|
||||
|
||||
#if defined(CONFIG_MTK_JEITA_STANDARD_SUPPORT) && defined(CONFIG_abc123_PROJECT)
|
||||
#if defined(CONFIG_MTK_JEITA_STANDARD_SUPPORT) && defined(CONFIG_AUSTIN_PROJECT)
|
||||
if ((g_temp_status == TEMP_ABOVE_POS_60) || (g_temp_status == TEMP_BELOW_NEG_10)
|
||||
|| (battery_idV > 500)) {
|
||||
temp_error_recovery_chr_flag = KAL_FALSE;
|
||||
|
||||
@@ -339,7 +339,7 @@ static int virtual_sensor_thermal_set_trip_hyst(struct thermal_zone_device *ther
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
void last_kmsg_thermal_shutdown(void)
|
||||
{
|
||||
int rc;
|
||||
@@ -371,7 +371,7 @@ static int virtual_sensor_thermal_notify(struct thermal_zone_device *thermal,
|
||||
snprintf(data, sizeof(data), "%s", "SHUTDOWN_WARNING");
|
||||
kobject_uevent_env(&thermal->device.kobj, KOBJ_CHANGE, envp);
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
pr_err("%s: thermal_shutdown notify\n", __func__);
|
||||
last_kmsg_thermal_shutdown();
|
||||
pr_err("%s: thermal_shutdown notify end\n", __func__);
|
||||
|
||||
@@ -38,7 +38,7 @@ struct mtk_thermal_platform_data {
|
||||
struct trip_t trips[THERMAL_MAX_TRIPS];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
void last_kmsg_thermal_shutdown(void);
|
||||
#endif
|
||||
#endif /* _MTK_THERMAL_H_ */
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
****************************************************************************/
|
||||
/* #define MAX_CHARGING_TIME 1*60*60 // 1hr */
|
||||
/* #define MAX_CHARGING_TIME 8*60*60 // 8hr */
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define MAX_CHARGING_TIME 12*60*60 /* 12hr */
|
||||
#else
|
||||
#define MAX_CHARGING_TIME 24*60*60 /* 24hr */
|
||||
@@ -112,7 +112,7 @@ typedef enum {
|
||||
#define TEMP_POS_45_THRESHOLD 45
|
||||
#define TEMP_POS_45_THRES_MINUS_X_DEGREE 45
|
||||
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define TEMP_POS_10_THRESHOLD 15
|
||||
#define TEMP_POS_10_THRES_PLUS_X_DEGREE 15
|
||||
#else
|
||||
@@ -195,7 +195,7 @@ extern kal_bool g_call_state;
|
||||
extern kal_bool g_charging_full_reset_bat_meter;
|
||||
extern signed int g_custom_charging_current;
|
||||
extern signed int g_custom_charging_cv;
|
||||
#ifdef CONFIG_abc123_PROJECT
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
extern unsigned int g_custom_charging_mode;
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user