目录
Android PowerSupply (二)power_supply_core
Android PowerSupply (三)power_supply_sys
Android PowerSupply (四)ChargeIC SGM41511 IC driver调试
Android PowerSupply (五)ChargeIC SGM41511 IC简介
Android Healthd BartteryMonitor
以下是 power supply driver 编写的简要过程
注册i2c 设备
static struct of_device_id sgm41511_charger_match_table[] = {
{ .compatible = "sgm41511", },
{ },
};
static const struct i2c_device_id sgm41511_charger_id[] = {
{ "sgm41511", 0x00 },
{ },
};
static struct i2c_driver sgm41511_charger_driver = {
.driver = {
.name = "sgm41511",
.of_match_table = sgm41511_charger_match_table,
},
.probe = sgm41511_charger_probe,
.remove = sgm41511_charger_remove,
.id_table = sgm41511_charger_id,
};
static int