Add required changes for austin and ford
This commit is contained in:
@@ -27,7 +27,39 @@
|
||||
#include <linux/thermal.h>
|
||||
#include <linux/cpumask.h>
|
||||
|
||||
#include <linux/module.h>
|
||||
|
||||
#ifdef CONFIG_CPU_THERMAL
|
||||
|
||||
/**
|
||||
* struct cpufreq_cooling_device - data for cooling device with cpufreq
|
||||
* @id: unique integer value corresponding to each cpufreq_cooling_device
|
||||
* registered.
|
||||
* @cool_dev: thermal_cooling_device pointer to keep track of the
|
||||
* registered cooling device.
|
||||
* @cpufreq_state: integer value representing the current state of cpufreq
|
||||
* cooling devices.
|
||||
* @cpufreq_val: integer value representing the absolute value of the clipped
|
||||
* frequency.
|
||||
* @allowed_cpus: all the cpus involved for this cpufreq_cooling_device.
|
||||
*
|
||||
* This structure is required for keeping information of each
|
||||
* cpufreq_cooling_device registered. In order to prevent corruption of this a
|
||||
* mutex lock cooling_cpufreq_lock is used.
|
||||
*/
|
||||
struct cpufreq_cooling_device {
|
||||
int id;
|
||||
struct thermal_cooling_device *cool_dev;
|
||||
unsigned long levels[THERMAL_MAX_TRIPS];
|
||||
unsigned long cooling_state;
|
||||
unsigned int cpufreq_state;
|
||||
unsigned int cpufreq_val;
|
||||
struct cpumask allowed_cpus;
|
||||
struct cpufreq_cooling_device *notify_device;
|
||||
struct notifier_block nb;
|
||||
struct list_head node;
|
||||
};
|
||||
|
||||
/**
|
||||
* cpufreq_cooling_register - function to create cpufreq cooling device.
|
||||
* @clip_cpus: cpumask of cpus where the frequency constraints will happen
|
||||
@@ -42,6 +74,7 @@ cpufreq_cooling_register(const struct cpumask *clip_cpus);
|
||||
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev);
|
||||
|
||||
unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq);
|
||||
unsigned int cpufreq_cooling_get_frequency(unsigned int cpu, unsigned long level);
|
||||
#else /* !CONFIG_CPU_THERMAL */
|
||||
static inline struct thermal_cooling_device *
|
||||
cpufreq_cooling_register(const struct cpumask *clip_cpus)
|
||||
@@ -58,6 +91,10 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
|
||||
{
|
||||
return THERMAL_CSTATE_INVALID;
|
||||
}
|
||||
unsigned int cpufreq_cooling_get_frequency(unsigned int cpu, unsigned long level)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_CPU_THERMAL */
|
||||
|
||||
#endif /* __CPU_COOLING_H__ */
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* TMP103 Temperature sensor driver file
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
|
||||
* Author: Mandrenko, Ievgen" <ievgen.mandrenko@ti.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* version 2 as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_TMP103_TEMPERATURE_SENSOR_H
|
||||
#define __ARCH_ARM_PLAT_OMAP_INCLUDE_PLAT_TMP103_TEMPERATURE_SENSOR_H
|
||||
|
||||
#define TMP103_SENSOR_NAME "tmp103_sensor"
|
||||
|
||||
#endif
|
||||
@@ -82,6 +82,8 @@
|
||||
#define RELEASE_POWER_KEY _IO('k', 31)
|
||||
#endif
|
||||
#define SET_KPD_KCOL _IO('k', 29)
|
||||
#define SET_KPD_KSWT_DEF _IO('k', 32)
|
||||
#define SET_KPD_KSWT_REV _IO('k', 33)
|
||||
|
||||
|
||||
#define KPD_SAY "kpd: "
|
||||
|
||||
@@ -279,6 +279,9 @@ struct mmc_card {
|
||||
#define MMC_QUIRK_KSI_V03_SKIP_TRIM (1<<13) /* Skip Kingston FRV=0x3 trim */
|
||||
#define MMC_QUIRK_TRIM_UNSTABLE (1<<28) /* Skip trim */
|
||||
/* byte mode */
|
||||
#ifdef CONFIG_MMC_SAMSUNG_SMART
|
||||
#define MMC_QUIRK_SAMSUNG_SMART (1<<11) /* Samrung smart read */
|
||||
#endif /* CONFIG_MMC_SAMSUNG_SMART */
|
||||
|
||||
unsigned int erase_size; /* erase size in sectors */
|
||||
unsigned int erase_shift; /* if erase unit is power 2 */
|
||||
@@ -305,7 +308,7 @@ struct mmc_card {
|
||||
struct sdio_func_tuple *tuples; /* unknown common tuples */
|
||||
|
||||
unsigned int sd_bus_speed; /* Bus Speed Mode set for the card */
|
||||
|
||||
unsigned int sd_speed_class; /* Bus Speed Mode set for the card */
|
||||
struct dentry *debugfs_root;
|
||||
struct mmc_part part[MMC_NUM_PHY_PARTITION]; /* physical partitions */
|
||||
unsigned int nr_parts;
|
||||
@@ -559,4 +562,9 @@ extern void mmc_unregister_driver(struct mmc_driver *);
|
||||
extern void mmc_fixup_device(struct mmc_card *card,
|
||||
const struct mmc_fixup *table);
|
||||
|
||||
#ifdef CONFIG_MMC_SAMSUNG_SMART
|
||||
extern ssize_t mmc_samsung_smart_handle(struct mmc_card *card, char *buf);
|
||||
extern int mmc_samsung_report(struct mmc_card *card, u8 *buf);
|
||||
#endif /* CONFIG_MMC_SAMSUNG_SMART */
|
||||
|
||||
#endif /* LINUX_MMC_CARD_H */
|
||||
|
||||
@@ -338,6 +338,9 @@ struct mmc_host {
|
||||
unsigned long clkgate_delay;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MMC_ERR_REMOVE
|
||||
bool rest_remove_flags;
|
||||
#endif
|
||||
/* host specific block data */
|
||||
unsigned int max_seg_size; /* see blk_queue_max_segment_size */
|
||||
unsigned short max_segs; /* see blk_queue_max_segments */
|
||||
|
||||
@@ -165,7 +165,6 @@ typedef enum {
|
||||
EMMC_BOOT_END
|
||||
} BOOT_PARTITION_EN;
|
||||
|
||||
#ifdef CONFIG_MTK_GPT_SCHEME_SUPPORT
|
||||
typedef enum {
|
||||
EMMC_PART_UNKNOWN=0
|
||||
,EMMC_PART_BOOT1
|
||||
@@ -178,7 +177,6 @@ typedef enum {
|
||||
,EMMC_PART_USER
|
||||
,EMMC_PART_END
|
||||
} Region;
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
CARD_INFO = 0,
|
||||
|
||||
@@ -57,6 +57,9 @@ struct musb;
|
||||
struct musb_hw_ep;
|
||||
struct musb_ep;
|
||||
extern volatile bool usb_is_host;
|
||||
extern int musb_host_dynamic_fifo;
|
||||
extern int musb_host_dynamic_fifo_usage_msk;
|
||||
extern void musb_bug(void);
|
||||
|
||||
/* Helper defines for struct musb->hwvers */
|
||||
#define MUSB_HWVERS_MAJOR(x) ((x >> 10) & 0x1f)
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
#ifndef _MTK_THERMAL_H_
|
||||
#define _MTK_THERMAL_H_
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/thermal.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/leds.h>
|
||||
|
||||
struct mtk_cooler_platform_data {
|
||||
char type[THERMAL_NAME_LENGTH];
|
||||
unsigned long state;
|
||||
unsigned long max_state;
|
||||
struct thermal_cooling_device *cdev;
|
||||
int level;
|
||||
int levels[THERMAL_MAX_TRIPS];
|
||||
};
|
||||
|
||||
struct cdev_t {
|
||||
char type[THERMAL_NAME_LENGTH];
|
||||
unsigned long upper;
|
||||
unsigned long lower;
|
||||
};
|
||||
|
||||
struct trip_t {
|
||||
unsigned long temp;
|
||||
enum thermal_trip_type type;
|
||||
unsigned long hyst;
|
||||
struct cdev_t cdev[THERMAL_MAX_TRIPS];
|
||||
};
|
||||
|
||||
struct mtk_thermal_platform_data {
|
||||
int num_trips;
|
||||
enum thermal_device_mode mode;
|
||||
int polling_delay;
|
||||
struct thermal_zone_params tzp;
|
||||
struct trip_t trips[THERMAL_MAX_TRIPS];
|
||||
};
|
||||
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
void last_kmsg_thermal_shutdown(void);
|
||||
#endif
|
||||
#endif /* _MTK_THERMAL_H_ */
|
||||
@@ -63,6 +63,41 @@ struct wakeup_source {
|
||||
bool autosleep_enabled:1;
|
||||
};
|
||||
|
||||
/* Ordered from most occurences to least */
|
||||
typedef enum {
|
||||
WEV_NONE = -1,
|
||||
WEV_RTC,
|
||||
WEV_WIFI,
|
||||
WEV_WAN,
|
||||
WEV_USB,
|
||||
WEV_PWR,
|
||||
WEV_HALL,
|
||||
WEV_BT,
|
||||
WEV_CHARGER,
|
||||
WEV_MAX,
|
||||
WEV_TOTAL = 20
|
||||
} wakeup_event_t;
|
||||
|
||||
/**
|
||||
* struct wakeup_event - Representation of a resume event
|
||||
*
|
||||
* @ev: Event responsible for pm_resume
|
||||
* @irq: Irq responsible for pm_resume.
|
||||
* @ev_count: Total number of times the event cause pm_resume.
|
||||
* @last_time: Last time the event was reported
|
||||
* @total_time: Total time between pm_resume triggered by this event to
|
||||
* the following successful pm_suspend
|
||||
*/
|
||||
|
||||
struct wakeup_event {
|
||||
const char *name;
|
||||
wakeup_event_t event;
|
||||
int irq;
|
||||
unsigned long count;
|
||||
ktime_t last_time;
|
||||
ktime_t total_time;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
|
||||
/*
|
||||
@@ -100,6 +135,10 @@ extern void pm_relax(struct device *dev);
|
||||
extern void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec);
|
||||
extern void pm_wakeup_event(struct device *dev, unsigned int msec);
|
||||
|
||||
extern void pm_report_resume_irq(int irq);
|
||||
extern void pm_report_resume_ev(wakeup_event_t ev, int irq);
|
||||
extern wakeup_event_t pm_get_resume_ev(ktime_t *ts);
|
||||
|
||||
#else /* !CONFIG_PM_SLEEP */
|
||||
|
||||
static inline void device_set_wakeup_capable(struct device *dev, bool capable)
|
||||
@@ -177,6 +216,10 @@ static inline void __pm_wakeup_event(struct wakeup_source *ws, unsigned int msec
|
||||
|
||||
static inline void pm_wakeup_event(struct device *dev, unsigned int msec) {}
|
||||
|
||||
static inline void pm_report_resume_irq(int irq) {}
|
||||
static inline void pm_report_resume_ev(wakeup_event_t ev, int irq) {}
|
||||
static inline wakeup_event_t pm_get_resume_ev(void) { return WEV_NONE; }
|
||||
|
||||
#endif /* !CONFIG_PM_SLEEP */
|
||||
|
||||
static inline void wakeup_source_init(struct wakeup_source *ws,
|
||||
|
||||
@@ -165,6 +165,10 @@ enum power_supply_property {
|
||||
POWER_SUPPLY_PROP_present_smb,
|
||||
/* ADB CMD Discharging */
|
||||
POWER_SUPPLY_PROP_adjust_power,
|
||||
/* ACOS_MOD_BEGIN {metrics_log} */
|
||||
POWER_SUPPLY_PROP_SUSPEND_DRAIN,
|
||||
POWER_SUPPLY_PROP_SUSPEND_REALTIME,
|
||||
/* ACOS_MOD_END {metrics_log} */
|
||||
/* Properties of type `const char *' */
|
||||
POWER_SUPPLY_PROP_MODEL_NAME,
|
||||
POWER_SUPPLY_PROP_MANUFACTURER,
|
||||
|
||||
@@ -48,8 +48,10 @@ void ctrl_alt_del(void);
|
||||
|
||||
#define POWEROFF_CMD_PATH_LEN 256
|
||||
extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN];
|
||||
extern char reboot_cmd[POWEROFF_CMD_PATH_LEN];
|
||||
|
||||
extern int orderly_poweroff(bool force);
|
||||
extern int orderly_reboot(bool force);
|
||||
|
||||
/*
|
||||
* Emergency restart, callable from an interrupt handler.
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#define DEFAULT_THERMAL_GOVERNOR "user_space"
|
||||
#elif defined(CONFIG_THERMAL_DEFAULT_GOV_BACKWARD_COMPATIBLE)
|
||||
#define DEFAULT_THERMAL_GOVERNOR "backward_compatible"
|
||||
#elif defined(CONFIG_THERMAL_DEFAULT_GOV_TRIP_STEP_WISE)
|
||||
#define DEFAULT_THERMAL_GOVERNOR "trip_step_wise"
|
||||
#endif
|
||||
|
||||
struct thermal_zone_device;
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Thermal Framework Driver
|
||||
*
|
||||
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
|
||||
* Author: Dan Murphy <DMurphy@ti.com>
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
* License version 2, as published by the Free Software Foundation, and
|
||||
* may be copied, distributed, and modified under those terms.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_THERMAL_FRAMEWORK_H__
|
||||
#define __LINUX_THERMAL_FRAMEWORK_H__
|
||||
|
||||
#define NUM_COOLERS 10
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
struct thermal_dev;
|
||||
struct cooling_device;
|
||||
|
||||
/**
|
||||
* struct virtual_sensor_params - Structure for each virtual sensor params.
|
||||
* @alpha: Moving average coefficient
|
||||
* @offset: Temperature offset
|
||||
* @weight: Weight
|
||||
*/
|
||||
struct thermal_dev_params {
|
||||
int offset;
|
||||
int alpha;
|
||||
int weight;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct thermal_dev_ops - Structure for device operation call backs
|
||||
* @get_temp: A temp sensor call back to get the current temperature.
|
||||
* temp is reported in milli degrees.
|
||||
*/
|
||||
struct thermal_dev_ops {
|
||||
int (*get_temp) (struct thermal_dev *);
|
||||
};
|
||||
|
||||
/**
|
||||
* struct thermal_dev - Structure for each thermal device.
|
||||
* @name: The name of the device that is registering to the framework
|
||||
* @dev: Device node
|
||||
* @dev_ops: The device specific operations for the sensor, governor and cooling
|
||||
* agents.
|
||||
* @node: The list node of the
|
||||
* @current_temp: The current temperature reported for the specific domain
|
||||
*
|
||||
*/
|
||||
struct thermal_dev {
|
||||
const char *name;
|
||||
struct device *dev;
|
||||
struct thermal_dev_ops *dev_ops;
|
||||
struct list_head node;
|
||||
struct thermal_dev_params *tdp;
|
||||
int current_temp;
|
||||
long off_temp;
|
||||
};
|
||||
/**
|
||||
* API to register a temperature sensor with a thermal zone
|
||||
*/
|
||||
int thermal_dev_register(struct thermal_dev *tdev);
|
||||
|
||||
#endif /* __LINUX_THERMAL_FRAMEWORK_H__ */
|
||||
@@ -22,8 +22,12 @@
|
||||
****************************************************************************/
|
||||
/* #define MAX_CHARGING_TIME 1*60*60 // 1hr */
|
||||
/* #define MAX_CHARGING_TIME 8*60*60 // 8hr */
|
||||
/* #define MAX_CHARGING_TIME 12*60*60 // 12hr */
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define MAX_CHARGING_TIME 12*60*60 /* 12hr */
|
||||
#else
|
||||
#define MAX_CHARGING_TIME 24*60*60 /* 24hr */
|
||||
#endif
|
||||
|
||||
|
||||
#define MAX_POSTFULL_SAFETY_TIME 1*30*60 /* 30mins */
|
||||
#define MAX_PreCC_CHARGING_TIME 1*30*60 /* 0.5hr */
|
||||
@@ -102,18 +106,22 @@ typedef enum {
|
||||
TEMP_ABOVE_POS_60
|
||||
} temp_state_enum;
|
||||
|
||||
|
||||
#define TEMP_POS_60_THRESHOLD 50
|
||||
#define TEMP_POS_60_THRES_MINUS_X_DEGREE 47
|
||||
#define TEMP_POS_60_THRESHOLD 60
|
||||
#define TEMP_POS_60_THRES_MINUS_X_DEGREE 60
|
||||
|
||||
#define TEMP_POS_45_THRESHOLD 45
|
||||
#define TEMP_POS_45_THRES_MINUS_X_DEGREE 39
|
||||
#define TEMP_POS_45_THRES_MINUS_X_DEGREE 45
|
||||
|
||||
#ifdef CONFIG_AUSTIN_PROJECT
|
||||
#define TEMP_POS_10_THRESHOLD 15
|
||||
#define TEMP_POS_10_THRES_PLUS_X_DEGREE 15
|
||||
#else
|
||||
#define TEMP_POS_10_THRESHOLD 10
|
||||
#define TEMP_POS_10_THRES_PLUS_X_DEGREE 16
|
||||
#define TEMP_POS_10_THRES_PLUS_X_DEGREE 10
|
||||
#endif
|
||||
|
||||
#define TEMP_POS_0_THRESHOLD 0
|
||||
#define TEMP_POS_0_THRES_PLUS_X_DEGREE 6
|
||||
#define TEMP_POS_0_THRES_PLUS_X_DEGREE 0
|
||||
|
||||
#ifdef CONFIG_MTK_FAN5405_SUPPORT
|
||||
#define TEMP_NEG_10_THRESHOLD 0
|
||||
@@ -135,13 +143,22 @@ typedef enum {
|
||||
TEMP_POS_HIGH
|
||||
} batt_temp_state_enum;
|
||||
|
||||
/*****************************************************************************
|
||||
* Test Mode
|
||||
****************************************************************************/
|
||||
typedef enum {
|
||||
TESTMODE_NONE = 0,
|
||||
TESTMODE_DISABLE_CHARGING,
|
||||
TESTMODE_ENABLE_CHARGING,
|
||||
} batt_test_mode_enum;
|
||||
|
||||
/*****************************************************************************
|
||||
* structure
|
||||
****************************************************************************/
|
||||
typedef struct {
|
||||
kal_bool bat_exist;
|
||||
kal_bool bat_full;
|
||||
INT32 bat_charging_state;
|
||||
INT32 bat_charging_state; /* use leading 16bit for test mode use */
|
||||
UINT32 bat_vol;
|
||||
kal_bool bat_in_recharging_state;
|
||||
kal_uint32 Vsense;
|
||||
@@ -164,6 +181,7 @@ typedef struct {
|
||||
UINT32 nPercent_ZCV;
|
||||
UINT32 nPrecent_UI_SOC_check_point;
|
||||
UINT32 ZCV;
|
||||
kal_bool bat_in_charging_enable;
|
||||
} PMU_ChargerStruct;
|
||||
|
||||
/*****************************************************************************
|
||||
@@ -175,6 +193,12 @@ extern kal_bool g_ftm_battery_flag;
|
||||
extern int charging_level_data[1];
|
||||
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_AUSTIN_PROJECT
|
||||
extern unsigned int g_custom_charging_mode;
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_MTK_PUMP_EXPRESS_SUPPORT) || defined(CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT)
|
||||
extern kal_bool ta_check_chr_type;
|
||||
extern kal_bool ta_cable_out_occur;
|
||||
|
||||
@@ -41,7 +41,7 @@ extern kal_int32 battery_meter_get_battery_temperature(void);
|
||||
extern kal_int32 battery_meter_get_charger_voltage(void);
|
||||
extern kal_int32 battery_meter_get_battery_percentage(void);
|
||||
extern kal_int32 battery_meter_initial(void);
|
||||
extern kal_int32 battery_meter_reset(void);
|
||||
extern kal_int32 battery_meter_reset(kal_bool bUI_SOC);
|
||||
extern kal_int32 battery_meter_sync(kal_int32 bat_i_sense_offset);
|
||||
|
||||
extern kal_int32 battery_meter_get_battery_zcv(void);
|
||||
@@ -51,6 +51,7 @@ extern kal_int32 battery_meter_get_battery_nPercent_UI_SOC(void); /* tracking po
|
||||
extern kal_int32 battery_meter_get_tempR(kal_int32 dwVolt);
|
||||
extern kal_int32 battery_meter_get_tempV(void);
|
||||
extern kal_int32 battery_meter_get_VSense(void); /* isense voltage */
|
||||
extern kal_int32 battery_meter_get_battery_soc(void);
|
||||
|
||||
|
||||
#endif /* #ifndef _BATTERY_METER_H */
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
/* ============================================================ */
|
||||
/* define */
|
||||
/* ============================================================ */
|
||||
#define BM_LOG_ERROR 0
|
||||
#define BM_LOG_CRTI 1
|
||||
#define BM_LOG_FULL 2
|
||||
|
||||
|
||||
+17
-5
@@ -39,6 +39,7 @@
|
||||
/*****************************************************************************
|
||||
* Log
|
||||
****************************************************************************/
|
||||
#define BAT_LOG_ERROR 0
|
||||
#define BAT_LOG_CRTI 1
|
||||
#define BAT_LOG_FULL 2
|
||||
|
||||
@@ -90,9 +91,6 @@ typedef enum {
|
||||
CHARGING_HOST,
|
||||
NONSTANDARD_CHARGER, /* AC : 450mA~1A */
|
||||
STANDARD_CHARGER, /* AC : ~1A */
|
||||
APPLE_2_1A_CHARGER, /* 2.1A apple charger */
|
||||
APPLE_1_0A_CHARGER, /* 1A apple charger */
|
||||
APPLE_0_5A_CHARGER, /* 0.5A apple charger */
|
||||
WIRELESS_CHARGER,
|
||||
} CHARGER_TYPE;
|
||||
|
||||
@@ -412,6 +410,7 @@ typedef enum {
|
||||
CHARGE_CURRENT_1450_00_MA = 145000,
|
||||
CHARGE_CURRENT_1500_00_MA = 150000,
|
||||
CHARGE_CURRENT_1525_00_MA = 152500,
|
||||
CHARGE_CURRENT_1550_00_MA = 155000,
|
||||
CHARGE_CURRENT_1575_00_MA = 157500,
|
||||
CHARGE_CURRENT_1600_00_MA = 160000,
|
||||
CHARGE_CURRENT_1650_00_MA = 165000,
|
||||
@@ -421,6 +420,7 @@ typedef enum {
|
||||
CHARGE_CURRENT_1750_00_MA = 175000,
|
||||
CHARGE_CURRENT_1800_00_MA = 180000,
|
||||
CHARGE_CURRENT_1825_00_MA = 182500,
|
||||
CHARGE_CURRENT_1850_00_MA = 185000,
|
||||
CHARGE_CURRENT_1875_00_MA = 187500,
|
||||
CHARGE_CURRENT_1900_00_MA = 190000,
|
||||
CHARGE_CURRENT_1950_00_MA = 195000,
|
||||
@@ -430,6 +430,7 @@ typedef enum {
|
||||
CHARGE_CURRENT_2050_00_MA = 205000,
|
||||
CHARGE_CURRENT_2100_00_MA = 210000,
|
||||
CHARGE_CURRENT_2125_00_MA = 212500,
|
||||
CHARGE_CURRENT_2150_00_MA = 215000,
|
||||
CHARGE_CURRENT_2175_00_MA = 217500,
|
||||
CHARGE_CURRENT_2200_00_MA = 220000,
|
||||
CHARGE_CURRENT_2300_00_MA = 230000,
|
||||
@@ -450,7 +451,7 @@ typedef enum {
|
||||
CHARGE_CURRENT_2900_00_MA = 290000,
|
||||
CHARGE_CURRENT_3000_00_MA = 300000,
|
||||
CHARGE_CURRENT_3100_00_MA = 310000,
|
||||
CHARGE_CURRENT_MAX
|
||||
CHARGE_CURRENT_MAX = 200000
|
||||
} CHR_CURRENT_ENUM;
|
||||
|
||||
/* ============================================================ */
|
||||
@@ -469,10 +470,21 @@ typedef kal_int32(*CHARGING_CONTROL) (CHARGING_CTRL_CMD cmd, void *data);
|
||||
/* ============================================================ */
|
||||
extern int Enable_BATDRV_LOG;
|
||||
extern kal_bool chargin_hw_init_done;
|
||||
#ifdef CONFIG_MTK_SN2871_SUPPORT
|
||||
extern kal_bool sn2871_is_found;
|
||||
#endif
|
||||
#ifdef CONFIG_MTK_BQ24296_SUPPORT
|
||||
extern kal_bool bq24296_is_found;
|
||||
#endif
|
||||
|
||||
|
||||
/* ============================================================ */
|
||||
/* External function */
|
||||
/* ============================================================ */
|
||||
extern kal_int32 chr_control_interface(CHARGING_CTRL_CMD cmd, void *data);
|
||||
#ifdef CONFIG_MTK_BQ24296_SUPPORT
|
||||
extern kal_int32 chr_control_interface_bq24296(CHARGING_CTRL_CMD cmd, void *data);
|
||||
#endif
|
||||
#ifdef CONFIG_MTK_SN2871_SUPPORT
|
||||
extern kal_int32 chr_control_interface_sn2871(CHARGING_CTRL_CMD cmd, void *data);
|
||||
#endif
|
||||
#endif /* #ifndef _CHARGING_H */
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef __DYNAMIC_BOOST_H__
|
||||
#define __DYNAMIC_BOOST_H__
|
||||
|
||||
enum mode{
|
||||
/* Actually there is no little core in MT8127.
|
||||
* We can treat little core as A7 core.
|
||||
*/
|
||||
PRIO_TWO_LITTLES,
|
||||
PRIO_TWO_LITTLES_MAX_FREQ,
|
||||
PRIO_MAX_CORES,
|
||||
PRIO_MAX_CORES_MAX_FREQ,
|
||||
PRIO_RESET,
|
||||
/* Define the max priority for priority limit */
|
||||
PRIO_DEFAULT
|
||||
};
|
||||
|
||||
enum control{
|
||||
OFF = -2,
|
||||
ON = -1
|
||||
};
|
||||
|
||||
int set_dynamic_boost(int duration, int prio_mode);
|
||||
|
||||
#endif /* __DYNAMIC_BOOST_H__ */
|
||||
@@ -13,6 +13,13 @@ typedef enum {
|
||||
RTC_GPIO_USER_PMIC = 12,
|
||||
} rtc_gpio_user_t;
|
||||
|
||||
enum rtc_reboot_reason {
|
||||
RTC_REBOOT_REASON_WARM,
|
||||
RTC_REBOOT_REASON_PANIC,
|
||||
RTC_REBOOT_REASON_SW_WDT,
|
||||
RTC_REBOOT_REASON_FROM_POC
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MTK_RTC
|
||||
|
||||
/*
|
||||
@@ -33,11 +40,22 @@ extern void rtc_disable_abb_32k(void);
|
||||
extern void rtc_enable_writeif(void);
|
||||
extern void rtc_disable_writeif(void);
|
||||
|
||||
extern bool rtc_lprst_detected(void);
|
||||
extern bool rtc_enter_kpoc_detected(void);
|
||||
|
||||
extern int rtc_get_reboot_reason(void);
|
||||
extern void rtc_mark_reboot_reason(int);
|
||||
|
||||
extern void rtc_mark_recovery(void);
|
||||
#if defined(CONFIG_MTK_KERNEL_POWER_OFF_CHARGING)
|
||||
extern void rtc_mark_kpoc(void);
|
||||
extern void rtc_mark_enter_kpoc(void);
|
||||
#endif
|
||||
extern void rtc_mark_fast(void);
|
||||
extern void rtc_mark_rpmbp(void);
|
||||
extern void rtc_mark_clear_lprst(void);
|
||||
extern void rtc_mark_enter_lprst(void);
|
||||
extern void rtc_mark_enter_sw_lprst(void);
|
||||
extern u16 rtc_rdwr_uart_bits(u16 *val);
|
||||
|
||||
extern void rtc_bbpu_power_down(void);
|
||||
@@ -52,6 +70,9 @@ extern void rtc_irq_handler(void);
|
||||
|
||||
extern bool crystal_exist_status(void);
|
||||
|
||||
extern void rtc_acquire_lock(void);
|
||||
extern void rtc_release_lock(void);
|
||||
|
||||
#else
|
||||
#define rtc_read_hw_time() ({ 0; })
|
||||
#define rtc_gpio_enable_32k(user) do {} while (0)
|
||||
@@ -61,11 +82,19 @@ extern bool crystal_exist_status(void);
|
||||
#define rtc_disable_abb_32k() do {} while (0)
|
||||
#define rtc_enable_writeif() do {} while (0)
|
||||
#define rtc_disable_writeif() do {} while (0)
|
||||
|
||||
#define rtc_lprst_detected() ({ 0; })
|
||||
#define rtc_enter_kpoc_detected() ({ 0; })
|
||||
#define rtc_mark_recovery() do {} while (0)
|
||||
#if defined(CONFIG_MTK_KERNEL_POWER_OFF_CHARGING)
|
||||
#define rtc_mark_kpoc() do {} while (0)
|
||||
#define rtc_mark_enter_kpoc() do {} while (0)
|
||||
#endif
|
||||
#define rtc_mark_fast() do {} while (0)
|
||||
#define rtc_mark_rpmbp() do {} while (0)
|
||||
#define rtc_mark_clear_lprst() do {} while (0)
|
||||
#define rtc_mark_enter_lprst() do {} while (0)
|
||||
#define rtc_mark_enter_sw_lprst() do {} while (0)
|
||||
#define rtc_rdwr_uart_bits(val) ({ 0; })
|
||||
#define rtc_bbpu_power_down() do {} while (0)
|
||||
#define rtc_read_pwron_alarm(alm) do {} while (0)
|
||||
@@ -73,6 +102,9 @@ extern bool crystal_exist_status(void);
|
||||
#define get_rtc_spare_fg_value() ({ 0; })
|
||||
#define set_rtc_spare_fg_value(val) ({ 0; })
|
||||
|
||||
#define rtc_get_reboot_reason() (0)
|
||||
#define rtc_mark_reboot_reason(arg) do {} while (0)
|
||||
|
||||
#define rtc_irq_handler() do {} while (0)
|
||||
|
||||
#define crystal_exist_status() do {} while (0)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef _CUST_TMP103_COOLER_
|
||||
#define _CUST_TMP103_COOLER_
|
||||
|
||||
#define MIN_CPU_POWER (594)
|
||||
#define MAX_CPU_POWER (4600)
|
||||
#define MAX_BRIGHTNESS (255)
|
||||
#define MIN_BRIGHTNESS (10)
|
||||
#define MAX_CHARGING_LIMIT (CHARGE_CURRENT_MAX)
|
||||
#define MIN_CHARGING_LIMIT (0)
|
||||
|
||||
enum tmp103_cooler_type {
|
||||
TMP103_COOLER_CPU = 0,
|
||||
TMP103_COOLER_BL,
|
||||
TMP103_COOLER_BC,
|
||||
};
|
||||
|
||||
struct tmp103_cooler_pdev {
|
||||
enum tmp103_cooler_type ctype;
|
||||
int action;
|
||||
int clear;
|
||||
char *name;
|
||||
};
|
||||
|
||||
struct tmp103_cooler_pdata {
|
||||
int count;
|
||||
struct tmp103_cooler_pdev *list;
|
||||
};
|
||||
|
||||
#endif /* _CUST_TMP103_COOLER_ */
|
||||
@@ -55,7 +55,7 @@ typedef struct {
|
||||
|
||||
// map_p: 0 = no remap, 1 = remap
|
||||
TZ_RESULT kree_register_sharedmem (KREE_SESSION_HANDLE session, KREE_SHAREDMEM_HANDLE *mem_handle,
|
||||
uint32_t start, uint32_t size, uint32_t map_p);
|
||||
uint32_t start, uint32_t size, void *map_p);
|
||||
|
||||
TZ_RESULT kree_unregister_sharedmem (KREE_SESSION_HANDLE session, KREE_SHAREDMEM_HANDLE mem_handle);
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ void kree_fiq_eoi(unsigned int iar);
|
||||
int kree_raise_softfiq(unsigned int mask, unsigned int irq);
|
||||
void kree_irq_mask_all(unsigned int *pmask, unsigned int size);
|
||||
void kree_irq_mask_restore(unsigned int *pmask, unsigned int size);
|
||||
int kree_set_fiq_affinity(int irq, int cpuid);
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ enum ReeServiceCommand {
|
||||
REE_SERV_ENABLE_CLOCK,
|
||||
REE_SERV_DISABLE_CLOCK,
|
||||
REE_SERV_THREAD_CREATE,
|
||||
|
||||
REE_SERV_SEMAPHORE_DOWNINT, /* interruptible down */
|
||||
};
|
||||
|
||||
////////// Param structure for commands
|
||||
@@ -65,10 +67,10 @@ struct REE_THREAD_INFO {
|
||||
|
||||
struct ree_service_irq
|
||||
{
|
||||
void *token;
|
||||
unsigned int irq;
|
||||
int enable;
|
||||
unsigned int flags;
|
||||
unsigned int token;
|
||||
};
|
||||
|
||||
struct ree_service_clock
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#define TZCMD_IRQ_MASK_ALL 5
|
||||
#define TZCMD_IRQ_MASK_RESTORE 6
|
||||
#define TZCMD_IRQ_QUERY_FIQ 7
|
||||
#define TZCMD_IRQ_SET_FIQ_AFFINITY 8
|
||||
|
||||
|
||||
|
||||
/* TZ Flags for TZCMD_IRQ_SET_FIQ */
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
#define TZCMD_MEM_SECURECM_READ 10
|
||||
#define TZCMD_MEM_SECURECM_WRITE 11
|
||||
#define TZCMD_MEM_SECURECM_RSIZE 12
|
||||
#define TZCMD_MEM_TOTAL_SIZE 13
|
||||
#define TZCMD_MEM_SECURECM_START 13
|
||||
#define TZCMD_MEM_SECURECM_STOP 14
|
||||
#define TZCMD_MEM_SECURECM_QUERY 15
|
||||
#define TZCMD_MEM_TOTAL_SIZE 16
|
||||
|
||||
#endif /* __TRUSTZONE_TA_MEM__ */
|
||||
|
||||
@@ -1,39 +1,4 @@
|
||||
/* Copyright Statement:
|
||||
*
|
||||
* This software/firmware and related documentation ("MediaTek Software") are
|
||||
* protected under relevant copyright laws. The information contained herein is
|
||||
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
|
||||
* the prior written permission of MediaTek inc. and/or its licensors, any
|
||||
* reproduction, modification, use or disclosure of MediaTek Software, and
|
||||
* information contained herein, in whole or in part, shall be strictly
|
||||
* prohibited.
|
||||
*
|
||||
* MediaTek Inc. (C) 2013. All rights reserved.
|
||||
*
|
||||
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
|
||||
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
|
||||
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
|
||||
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
|
||||
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
|
||||
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
|
||||
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
|
||||
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
|
||||
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
|
||||
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
|
||||
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
|
||||
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
|
||||
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
|
||||
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
|
||||
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
|
||||
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
|
||||
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
|
||||
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
|
||||
*
|
||||
* The following software/firmware and/or related documentation ("MediaTek
|
||||
* Software") have been modified by MediaTek Inc. All revisions are subject to
|
||||
* any receiver's applicable license agreements with MediaTek Inc.
|
||||
*/
|
||||
/* MediaTek Inc. (C) 2010. All rights reserved. */
|
||||
|
||||
#ifndef __TRUSTZONE_TA_MODULAR_DRM__
|
||||
#define __TRUSTZONE_TA_MODULAR_DRM__
|
||||
|
||||
@@ -7,12 +7,16 @@
|
||||
#define DONT_USE_BS_VA 1 // for VP path integration set to 1, for mfv_ut set to 0
|
||||
#define USE_MTEE_M4U
|
||||
#define USE_MTEE_DAPC
|
||||
|
||||
#define HEVC_SVP_UT_ENABLE 0
|
||||
|
||||
/* Command for VDEC TA */
|
||||
#define TZCMD_VDEC_AVC_INIT 0
|
||||
#define TZCMD_VDEC_AVC_DECODE 1
|
||||
#define TZCMD_VDEC_AVC_DEINIT 2
|
||||
#define TZCMD_VDEC_HEVC_INIT 3
|
||||
#define TZCMD_VDEC_HEVC_DECODE 4
|
||||
#define TZCMD_VDEC_HEVC_DEINIT 5
|
||||
#define TZCMD_VDEC_FILL_SECMEM 6
|
||||
|
||||
#define TZCMD_VDEC_TEST 100
|
||||
#endif /* __TRUSTZONE_TA_VDEC__ */
|
||||
|
||||
Reference in New Issue
Block a user