blob: af169e2ee645c4629e04b754b2a9be7926f8258b [file] [log] [blame]
# SPDX-License-Identifier: GPL-2.0
#
# Makefile for Google Battery Management System
#
obj-$(CONFIG_GOOGLE_BMS) += google-bms.o
google-bms-objs += google_bms.o
google-bms-objs += gbms_storage.o
# TODO(166536889): enable bee only on the devices supporting it. This will
# require a change in the API since right now storage call into eeprom that
# calls back into storage.
# KBUILD_OPTIONS += CONFIG_GOOGLE_BEE=m \
# obj-$(CONFIG_GOOGLE_BEE) += google_eeprom.o
google-bms-objs += google_eeprom.o
# TODO(163679860) remove pmic-voter usage from bms
google-bms-objs += pmic-voter-compat.o
# Battery
obj-$(CONFIG_GOOGLE_BATTERY) += google-battery.o
google-battery-objs += google_battery.o
google-battery-objs += google_ttf.o
# google_charger
obj-$(CONFIG_GOOGLE_CHARGER) += google-charger.o
google-charger-objs += google_charger.o
google-charger-objs += google_dc_pps.o
# charging policy manager, for devices that have more HW chargers
# requires google_dc_pps
obj-$(CONFIG_GOOGLE_CPM) += google-cpm.o
google-cpm-objs += google_cpm.o
google-cpm-objs += google_dc_pps.o
# Overheat mitigation driver
obj-$(CONFIG_USB_OVERHEAT_MITIGATION) += overheat_mitigation.o
# max7729f drivers for the single SSID
obj-$(CONFIG_PMIC_MAX77729) += max77729_pmic.o
obj-$(CONFIG_UIC_MAX77729) += max77729_uic.o
obj-$(CONFIG_CHARGER_MAX77729) += max77729_charger.o
# Muirwoods drivers for the single SSID (max77729_pmic is shared)
obj-$(CONFIG_MAXQ_MAX77759) += max77759_maxq.o
obj-$(CONFIG_CHARGER_MAX77759) += max77759_charger.o
# Secondary charger, needs google_dc_pps
obj-$(CONFIG_CHARGER_PCA9468) += pca9468_charger.o
# Wireless charging
obj-$(CONFIG_CHARGER_P9221) += p9221.o
p9221-objs += p9221_charger.o
p9221-objs += p9221_chip.o
# Alternate (untested) standalone for pca9468
obj-$(CONFIG_PCA9468) += pca9468.o
pca9468-objs += pca9468_charger.o
pca9468-objs += google_dc_pps.o
# Alternate (untested) standalone for max77729f sans FG
obj-$(CONFIG_MAX77729) += max77729.o
max77729-objs += max77729_pmic.o
max77729-objs += max77729_uic.o
max77729-objs += max77729_charger.o
# Alternate (untested) standalone for max77759 sans FG
obj-$(CONFIG_MAX77759) += max77759.o
max77759-objs += max77729_pmic.o
max77759-objs += max77729_uic.o
max77759-objs += max77729_charger.o
max77759-objs += max77759_maxq.o
# TODO: enable max_m5 only when we have max77759 or max77729
obj-$(CONFIG_BATTERY_MAX1720X) += max1720x-battery.o
max1720x-battery-objs += max1720x_battery.o
max1720x-battery-objs += max_m5.o
# OVP
obj-$(CONFIG_MAX20339) += max20339.o
# prevent warnings on gernated include files
CFLAGS_max77759_charger.o += -Wno-unused-function
CFLAGS_max77729_charger.o += -Wno-unused-function
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
M ?= $(shell pwd)
KBUILD_OPTIONS += CONFIG_GOOGLE_BMS=m \
CONFIG_GOOGLE_BATTERY=m \
CONFIG_GOOGLE_CHARGER=m \
CONFIG_GOOGLE_CPM=m \
CONFIG_USB_OVERHEAT_MITIGATION=m \
CONFIG_PMIC_MAX77729=m \
CONFIG_UIC_MAX77729=m \
CONFIG_CHARGER_MAX77729=m \
CONFIG_MAXQ_MAX77759=m \
CONFIG_CHARGER_MAX77759=m \
CONFIG_CHARGER_P9221=m \
CONFIG_BATTERY_MAX1720X=m \
CONFIG_PCA9468=m \
CONFIG_MAX20339=m \
modules modules_install clean:
$(MAKE) -C $(KERNEL_SRC) M=$(M) W=1 $(KBUILD_OPTIONS) $(@)
gtags:
$()