mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
rk3288:modify rk808 vabt low error, set charger current
This commit is contained in:
@@ -201,13 +201,13 @@
|
||||
reg = <0x6b>;
|
||||
gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
|
||||
bq24296,chg_current = <1000 500 2000>;
|
||||
status = "disable";
|
||||
status = "okay";
|
||||
};
|
||||
bq27320: bq27320@55 {
|
||||
compatible = "ti,bq27320";
|
||||
reg = <0x55>;
|
||||
/* gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
|
||||
status = "disable";
|
||||
status = "okay";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -308,6 +308,8 @@ CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_SPI_ROCKCHIP_DMA=y
|
||||
CONFIG_DEBUG_GPIO=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_BATTERY_BQ24296=y
|
||||
CONFIG_BATTERY_BQ27320=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_MFD_RK808=y
|
||||
CONFIG_REGULATOR=y
|
||||
|
||||
@@ -1213,7 +1213,6 @@ static int rk808_pre_init(struct rk808 *rk808)
|
||||
}
|
||||
/****************************************/
|
||||
|
||||
|
||||
/****************set vbat low **********/
|
||||
val = rk808_reg_read(rk808,RK808_VB_MON_REG);
|
||||
val &=(~(VBAT_LOW_VOL_MASK | VBAT_LOW_ACT_MASK));
|
||||
@@ -1351,7 +1350,7 @@ static int rk808_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i
|
||||
ret = mfd_add_devices(rk808->dev, -1,
|
||||
rk808s, ARRAY_SIZE(rk808s),
|
||||
NULL, 0,NULL);
|
||||
|
||||
#if 0
|
||||
/********************vbat low int**************/
|
||||
vlow_irq = irq_create_mapping(rk808->irq_domain, RK808_IRQ_VB_LO);
|
||||
ret = request_threaded_irq(vlow_irq, NULL, rk808_vbat_lo_irq,
|
||||
@@ -1362,7 +1361,7 @@ static int rk808_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id *i
|
||||
vlow_irq+ RK808_IRQ_VB_LO, ret);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
/*********************************************/
|
||||
|
||||
g_rk808 = rk808;
|
||||
|
||||
@@ -402,13 +402,16 @@ static void usb_detect_work_func(struct work_struct *work)
|
||||
}else{
|
||||
#endif
|
||||
// connect to pc
|
||||
bq24296_update_input_current_limit(bq24296_di->usb_input_current);
|
||||
bq24296_update_input_current_limit(bq24296_di->adp_input_current);
|
||||
bq24296_set_charge_current(CHARGE_CURRENT_512MA);
|
||||
bq24296_charge_mode_config(0);
|
||||
DBG("bq24296: detect normal usb charger\n");
|
||||
// }
|
||||
break;
|
||||
default:
|
||||
bq24296_update_input_current_limit(bq24296_di->adp_input_current);
|
||||
bq24296_set_charge_current(CHARGE_CURRENT_512MA);
|
||||
bq24296_charge_mode_config(0);
|
||||
DBG("bq24296: detect no usb \n");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user