};
#endif
+#if defined (CONFIG_BATTERY_BQ27541)
+#define DC_CHECK_PIN RK29_PIN4_PA1
+#define LI_LION_BAT_NUM 1
+static int bq27541_init_dc_check_pin(void){
+ if(gpio_request(DC_CHECK_PIN,"dc_check") != 0){
+ gpio_free(DC_CHECK_PIN);
+ printk("bq27541 init dc check pin request error\n");
+ return -EIO;
+ }
+ gpio_direction_input(DC_CHECK_PIN);
+ return 0;
+}
+
+struct bq27541_platform_data bq27541_info = {
+ .init_dc_check_pin = bq27541_init_dc_check_pin,
+ .dc_check_pin = DC_CHECK_PIN,
+ .bat_num = LI_LION_BAT_NUM,
+};
+#endif
/*****************************************************************************************
* i2c devices
#ifdef CONFIG_I2C3_RK29
static struct i2c_board_info __initdata board_i2c3_devices[] = {
+ #if defined (CONFIG_BATTERY_BQ27541)
+ {
+ .type = "bq27541",
+ .addr = 0x55,
+ .flags = 0,
+ .platform_data = &bq27541_info,
+ },
+#endif
};
#endif
if(copy_to_user(argp, &sn.UID_Data, sizeof(sn.UID_Data))) return -EFAULT;\r
}\r
break;\r
+/* \r
case NEWTON_AC_DETEC:\r
{\r
int ac_status = rk29_newton_get_ac_status();\r
if(copy_to_user(argp, &ac_status, 4)) return -EFAULT;\r
}\r
break;\r
+*/\r
+\r
case NEWTON_GPS_CTRL:\r
{\r
int value = 0;\r
printk("gpio_request NEWTON_GPIO_GPS_PWR error\n");\r
return -EIO;\r
}\r
+ \r
+/*\r
if(gpio_request(NEWTON_GPIO_AC_DETEC,NULL) != 0){\r
gpio_free(NEWTON_GPIO_AC_DETEC);\r
printk("gpio_request NEWTON_GPIO_AC_DETEC error\n");\r
return -EIO;\r
}\r
+*/\r
rk29_newton_set_gps_power(GPIO_LOW);\r
DBG("%s:rk29 newton initialized\n",__FUNCTION__);\r
return ret;\r