C Code \kernel-4.14\drivers\misc\mediatek\power\mt8168\Makefile
1 2 3 4 5 | | ifneq ($(CONFIG_FPGA_EARLY_PORTING),y) obj-y += mtk_battery_intf.o else obj-y += misc.o endif |
C Code \kernel-4.14\drivers\power\supply\Makefile
1 2 3 4 5 6 7 8 9 10 11 12 13 | | # SPDX-License-Identifier: GPL-2.0 subdir-ccflags-$(CONFIG_POWER_SUPPLY_DEBUG) := -DDEBUG
power_supply-y := power_supply_core.o power_supply-$(CONFIG_SYSFS) += power_supply_sysfs.o power_supply-$(CONFIG_LEDS_TRIGGERS) += power_supply_leds.o
obj-$(CONFIG_POWER_SUPPLY) += power_supply.o
ifeq ($(CONFIG_MACH_MT8173),y) else obj-y += mediatek/ endif |
C Code \kernel-4.14\drivers\power\supply\mediatek\Makefile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | | ifneq ($(CONFIG_FPGA_EARLY_PORTING),y) ifeq ($(CONFIG_MTK_GAUGE_VERSION),30) obj-y += battery/ endif endif
ifeq ($(CONFIG_MTK_GAUGE_VERSION),30) obj-$(CONFIG_MTK_CHARGER) += charger/ else ifeq ($(CONFIG_MTK_GAUGE_VERSION),20) obj-$(CONFIG_MTK_SMART_BATTERY) += battery_meter_fg_20.o battery_common_fg_20.o obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT) += mtk_pep_intf.o obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_20_SUPPORT) += mtk_pep20_intf.o else obj-$(CONFIG_MTK_SMART_BATTERY) += battery_meter.o battery_common.o obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_SUPPORT) += mtk_pep_intf.o obj-$(CONFIG_MTK_PUMP_EXPRESS_PLUS_20_SUPPORT) += mtk_pep20_intf.o endif |
C Code \kernel-4.14\drivers\power\supply\mediatek\battery\Makefile
1 2 3 | | ifeq ($(CONFIG_MTK_GAUGE_VERSION),30) obj-y += mtk_battery.o mtk_power_misc.o mtk_gauge_coulomb_service.o mtk_gauge_class.o mtk_battery_recovery.o mtk_battery_core.o endif |
C Code \kernel-4.14\drivers\power\supply\mediatek\charger\Makefile
1 2 3 | | obj-y += charger_class.o mtk_charger.o mtk_switch_charging.o mtk_pdc_intf.o\ mtk_chg_type_det.o mtk_pe40_intf.o mtk_linear_charging.o\ adapter_class.o mtk_pd_adapter.o |
mtk_battery.c主要是电量计相关的代码类似于之前的battery_meter.c文件
mtk_charger.c相当于之前的battery_common.c文件,mtk_linear_charging.c文件则相当于之前的linear_charging.c