如果需要操作pmic reg的device不是pmic的子設備,那麼在方案1中的第3步,就不能使用,需要做如下調整: 相關定義和封裝,可以參考,charger相關格式: /kernel-4.19/drivers/power/supply/mtk_charger_intf.c int disable_hw_ovp(struct mtk_charger *info, int en) { struct device_node *pmic_node; struct platfor...
c b/drivers/misc/mediatek/pmic/mt6370/mt6370_pmu_charger.c里的函数mt6370_pmu_charger_probe加入...
b.switch charge方式充电(switch charger是功率转换型的芯片)。驱动代码位于: mediatek\platform\mt6592\kernel\drivers\power\charging_hw_xxxx.c 比如:fan5405 对应的文件就是charging_hw_fan5405.c BQ24158对应的文件就是charging_hw_bq24158.c 具体配置位于: MTK_FAN5405_SUPPORT=no MTK_FASTBOOT_SUPPORT=no2....
mediatek\platform\mt6592\kernel\drivers\power\charging_hw_pmic.c b.switch charge方式充电(switch charger是功率转换型的芯片)。驱动代码位于: mediatek\platform\mt6592\kernel\drivers\power\charging_hw_xxxx.c 比如:fan5405 对应的文件就是charging_hw_fan5405.c bq24158对应的文件就是charging_hw_bq24158.c ...
[ 0.410640] (0)[1:swapper/0]ccci_helper_probe [ 0.488574] (0)[1:swapper/0][Power/cpu_management] cpu_opp_mask: name=thermal, flag=1 [ 0.489545] (0)[1:swapper/0][Power/cpu_management] cpu_opp_mask: Add new module--thermal [ 0.490552] (0)[1:swapper/0][Power/cpu_management] ...
"[BATTERY] Charger plug in/out, Call battery_meter_reset. (%d)\n", BMT_status.UI_SOC); } } return 0; 在这个线程中,每隔10s会去调用函数BAT_Thread去获取电池数据 BAT_Thread void BAT_thread(void) { static kal_bool battery_meter_initilized = KAL_FALSE; ...
mt_usb_probe musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); //动态加载platfor_device pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); //分配struct musb_hdrc_platform_data config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL); //分配stru...
battery_meter_initial(); //move from battery_probe() to decrease booting time BMT_status.nPercent_ZCV = battery_meter_get_battery_nPercent_zcv(); battery_meter_initilized = KAL_TRUE; } mt_battery_charger_detect_check(); mt_battery_GetBatteryData(); mt_battery_thermal_check(); ...
MTK充电流程 G_bat_full_user_view == 1 否 bat_volt_check_point >= 100
b.switch charge方式充电(switch charger是功率转换型的芯片)。驱动代码位于: mediatek\platform\mt6592\kernel\drivers\power\charging_hw_xxxx.c 比如:fan5405 对应的文件就是charging_hw_fan5405.c bq24158对应的文件就是charging_hw_bq24158.c 具体配置位于: ...