int touch_en_gpio;
};
-
-//#if defined CONFIG_BATTERY_RK30_ADC_FAC
-/* adc battery */
-struct rk30_adc_battery_platform_data {
- int (*io_init)(void);
- int (*io_deinit)(void);
- int (*is_dc_charging)(void);
- int (*charging_ok)(void);
-
- int (*is_usb_charging)(void);
- int spport_usb_charging ;
- int (*control_usb_charging)(int);
-
- int dc_det_pin;
- int batt_low_pin;
- int charge_ok_pin;
- int charge_set_pin;
-
- int dc_det_level;
- int batt_low_level;
- int charge_ok_level;
- int charge_set_level;
-
- int adc_channel;
-
- int dc_det_pin_pull; //pull up/down enable/disbale
- int batt_low_pin_pull;
- int charge_ok_pin_pull;
- int charge_set_pin_pull;
-
- int low_voltage_protection; // low voltage protection
-
- int charging_sleep; // don't have lock,if chargeing_sleep = 0;else have lock
-
-
- int save_capacity; //save capacity to /data/bat_last_capacity.dat, suggested use
-
- int reference_voltage; // the rK2928 is 3300;RK3066 and rk29 are 2500;rk3066B is 1800;
- int pull_up_res; //divider resistance , pull-up resistor
- int pull_down_res; //divider resistance , pull-down resistor
-
- int time_down_discharge; //the time of capactiy drop 1% --discharge
- int time_up_charge; //the time of capacity up 1% ---charging
-
- int use_board_table;
- int table_size;
- int *discharge_table;
- int *charge_table;
- int *property_tabel;
- int *board_batt_table;
-
-};
-//#endif
-
#ifndef _LINUX_WLAN_PLAT_H_
struct wifi_platform_data {
int (*set_power)(int val);
#include <plat/board.h>
#include <mach/sram.h>
#include <linux/i2c-gpio.h>
-/* adc battery */
-struct rk30_adc_battery_platform_data {
- int (*io_init)(void);
- int (*io_deinit)(void);
- int (*is_dc_charging)(void);
- int (*charging_ok)(void);
-
- int (*is_usb_charging)(void);
- int spport_usb_charging ;
- int (*control_usb_charging)(int);
-
- int dc_det_pin;
- int batt_low_pin;
- int charge_ok_pin;
- int charge_set_pin;
-
- int dc_det_level;
- int batt_low_level;
- int charge_ok_level;
- int charge_set_level;
-
- int adc_channel;
-
- int dc_det_pin_pull; //pull up/down enable/disbale
- int batt_low_pin_pull;
- int charge_ok_pin_pull;
- int charge_set_pin_pull;
-
- int low_voltage_protection; // low voltage protection
-
- int charging_sleep; // don't have lock,if chargeing_sleep = 0;else have lock
-
-
- int save_capacity; //save capacity to /data/bat_last_capacity.dat, suggested use
-
- int reference_voltage; // the rK2928 is 3300;RK3066 and rk29 are 2500;rk3066B is 1800;
- int pull_up_res; //divider resistance , pull-up resistor
- int pull_down_res; //divider resistance , pull-down resistor
-
- int time_down_discharge; //the time of capactiy drop 1% --discharge
- int time_up_charge; //the time of capacity up 1% ---charging
-
- int use_board_table;
- int table_size;
- int *discharge_table;
- int *charge_table;
- int *property_tabel;
- int *board_batt_table;
-
-};
#ifndef _LINUX_WLAN_PLAT_H_
struct wifi_platform_data {
int (*rmii_power_control)(int enable);
int(*rmii_speed_switch)(int speed);
};
+//#if defined CONFIG_BATTERY_RK30_ADC_FAC
+/* adc battery */
+struct rk30_adc_battery_platform_data {
+ int (*io_init)(void);
+ int (*io_deinit)(void);
+ int (*is_dc_charging)(void);
+ int (*charging_ok)(void);
+
+ int (*is_usb_charging)(void);
+ int spport_usb_charging ;
+ int (*control_usb_charging)(int);
+
+ int is_reboot_charging;
+
+ int dc_det_pin;
+ int batt_low_pin;
+ int charge_ok_pin;
+ int charge_set_pin;
+
+ int dc_det_level;
+ int batt_low_level;
+ int charge_ok_level;
+ int charge_set_level;
+
+ int adc_channel;
+
+ int dc_det_pin_pull; //pull up/down enable/disbale
+ int batt_low_pin_pull;
+ int charge_ok_pin_pull;
+ int charge_set_pin_pull;
+
+ int low_voltage_protection; // low voltage protection
+
+ int charging_sleep; // don't have lock,if chargeing_sleep = 0;else have lock
+
+
+ int save_capacity; //save capacity to /data/bat_last_capacity.dat, suggested use
+
+ int reference_voltage; // the rK2928 is 3300;RK3066 and rk29 are 2500;rk3066B is 1800;
+ int pull_up_res; //divider resistance , pull-up resistor
+ int pull_down_res; //divider resistance , pull-down resistor
+
+ int time_down_discharge; //the time of capactiy drop 1% --discharge
+ int time_up_charge; //the time of capacity up 1% ---charging
+
+ int use_board_table;
+ int table_size;
+ int *discharge_table;
+ int *charge_table;
+ int *property_tabel;
+ int *board_batt_table;
+
+};
+//#endif
+
#define BOOT_MODE_NORMAL 0
#define BOOT_MODE_FACTORY2 1
// //2£©Èç¹û²»ÕâÑù×ö£¬¶Ìʱ¼ä¹Ø»úÔÙ¿ª»ú£¬Ç°ºóÈÝÁ¿²»Ò»ÖÂÓÖ¸ÃÔõô°ì£¿
// //3£©Ò»ÏÂÄÇÖÖ·½Ê½ºÏÊÊ£¿
//gBatteryData->bat_capacity = new_capacity;
- gBatteryData->bat_capacity = (new_capacity > old_capacity) ? new_capacity : old_capacity;
+ // gBatteryData->bat_capacity = (new_capacity > old_capacity) ? new_capacity : old_capacity;
+ if( gBatteryData ->pdata->is_reboot_charging == 1)
+ gBatteryData->bat_capacity = old_capacity;
+ else
+ gBatteryData->bat_capacity = (new_capacity > old_capacity) ? new_capacity : old_capacity;
+
}else{
if(new_capacity > old_capacity + 50 )