2011-09-04 19:24:27 +00:00
|
|
|
############################################################################
|
2012-01-22 16:42:49 +00:00
|
|
|
# drivers/power/Make.defs
|
2011-09-04 19:24:27 +00:00
|
|
|
#
|
2021-03-04 07:10:42 +01:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance with the
|
|
|
|
# License. You may obtain a copy of the License at
|
2011-09-04 19:24:27 +00:00
|
|
|
#
|
2021-03-04 07:10:42 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-09-04 19:24:27 +00:00
|
|
|
#
|
2021-03-04 07:10:42 +01:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
2011-09-04 19:24:27 +00:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
# Include power management sources
|
|
|
|
|
2012-01-22 18:03:13 +00:00
|
|
|
ifeq ($(CONFIG_PM),y)
|
|
|
|
|
2019-11-09 09:09:33 -06:00
|
|
|
CSRCS += pm_initialize.c pm_activity.c pm_changestate.c pm_checkstate.c
|
|
|
|
CSRCS += pm_register.c pm_unregister.c
|
|
|
|
|
|
|
|
# Governor implementations
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PM_GOVERNOR_ACTIVITY),y)
|
|
|
|
|
|
|
|
CSRCS += activity_governor.c
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_PM_GOVERNOR_GREEDY),y)
|
|
|
|
|
|
|
|
CSRCS += greedy_governor.c
|
|
|
|
|
|
|
|
endif
|
2011-09-04 19:24:27 +00:00
|
|
|
|
2012-01-22 18:03:13 +00:00
|
|
|
# Include power management in the build
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2012-01-22 18:03:13 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-07-23 07:35:09 -06:00
|
|
|
# Add switched-mode power supply support
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_DRIVERS_SMPS),y)
|
|
|
|
|
|
|
|
CSRCS += smps.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2017-07-23 07:35:09 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-09-10 17:43:20 +00:00
|
|
|
# Add powerled support
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_DRIVERS_POWERLED),y)
|
|
|
|
|
|
|
|
CSRCS += powerled.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2017-09-10 17:43:20 +00:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-09-20 09:47:00 -06:00
|
|
|
# Add battery charger drivers
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2015-09-19 13:06:43 -06:00
|
|
|
ifeq ($(CONFIG_BATTERY_CHARGER),y)
|
2015-09-20 09:47:00 -06:00
|
|
|
|
2015-09-19 13:06:43 -06:00
|
|
|
CSRCS += battery_charger.c
|
2015-09-20 09:47:00 -06:00
|
|
|
|
2018-12-31 12:56:56 -06:00
|
|
|
# Add the MCP73871 battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_MCP73871),y)
|
|
|
|
CSRCS += mcp73871.c
|
|
|
|
endif
|
|
|
|
|
2015-09-20 09:47:00 -06:00
|
|
|
# Add I2C-based battery charger drivers
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C),y)
|
|
|
|
|
|
|
|
# Add the BQ2425x I2C-based battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C_BQ2425X),y)
|
|
|
|
CSRCS += bq2425x.c
|
|
|
|
endif
|
|
|
|
|
2017-08-25 07:26:00 -06:00
|
|
|
# Add the BQ2429x I2C-based battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C_BQ2429X),y)
|
|
|
|
CSRCS += bq2429x.c
|
|
|
|
endif
|
|
|
|
|
2015-09-19 13:06:43 -06:00
|
|
|
endif
|
|
|
|
|
2017-07-23 07:35:09 -06:00
|
|
|
# Include power support in the build
|
2015-09-20 09:47:00 -06:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2015-09-20 09:47:00 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add battery gauge drivers
|
|
|
|
|
2015-09-19 11:00:14 -06:00
|
|
|
ifeq ($(CONFIG_BATTERY_GAUGE),y)
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2015-09-19 11:00:14 -06:00
|
|
|
CSRCS += battery_gauge.c
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2015-09-20 09:47:00 -06:00
|
|
|
# Add I2C-based battery gauge drivers
|
2012-01-22 16:42:49 +00:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C),y)
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2020-02-23 02:31:14 +08:00
|
|
|
# Add the MAX1704x I2C-based battery gauge driver
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2012-01-22 16:42:49 +00:00
|
|
|
ifeq ($(CONFIG_I2C_MAX1704X),y)
|
|
|
|
CSRCS += max1704x.c
|
|
|
|
endif
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2021-02-25 10:34:37 -03:00
|
|
|
# Add the bq27426 I2C-based battery gauge driver
|
2020-08-20 01:07:22 -03:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_BQ27426),y)
|
|
|
|
CSRCS += bq27426.c
|
|
|
|
endif
|
|
|
|
|
2012-01-22 18:03:13 +00:00
|
|
|
endif
|
|
|
|
|
2020-02-23 16:50:23 +08:00
|
|
|
# Include battery support in the build
|
2012-01-22 18:03:13 +00:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2012-01-22 18:03:13 +00:00
|
|
|
|
2012-01-22 16:42:49 +00:00
|
|
|
endif
|
|
|
|
|
2020-02-28 18:17:27 -06:00
|
|
|
# Add battery monitor drivers
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_BATTERY_MONITOR),y)
|
|
|
|
|
|
|
|
CSRCS += battery_monitor.c
|
|
|
|
|
|
|
|
# Add I2C-based battery monitor drivers
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C),y)
|
|
|
|
|
|
|
|
# Add the BQ769x0 I2C-based battery monitor driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C_BQ769X0),y)
|
|
|
|
CSRCS += bq769x0.c
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2021-02-25 10:34:37 -03:00
|
|
|
# Include battery support in the build
|
2020-02-28 18:17:27 -06:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 11:51:22 +08:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2020-02-28 18:17:27 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2011-09-04 19:24:27 +00:00
|
|
|
# Include power management in the build
|
|
|
|
|
2012-01-22 18:03:13 +00:00
|
|
|
DEPPATH += $(POWER_DEPPATH)
|
|
|
|
VPATH += $(POWER_VPATH)
|
2012-01-23 17:19:43 +00:00
|
|
|
CFLAGS += $(POWER_CFLAGS)
|