2011-09-04 21:24:27 +02:00
|
|
|
############################################################################
|
2012-01-22 17:42:49 +01:00
|
|
|
# drivers/power/Make.defs
|
2011-09-04 21:24:27 +02: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 21:24:27 +02:00
|
|
|
#
|
2021-03-04 07:10:42 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2011-09-04 21:24:27 +02: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 21:24:27 +02:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
# Include power management sources
|
|
|
|
|
2012-01-22 19:03:13 +01:00
|
|
|
ifeq ($(CONFIG_PM),y)
|
|
|
|
|
2019-11-09 16:09:33 +01:00
|
|
|
CSRCS += pm_initialize.c pm_activity.c pm_changestate.c pm_checkstate.c
|
2022-03-15 13:42:34 +01:00
|
|
|
CSRCS += pm_register.c pm_unregister.c pm_autoupdate.c pm_governor.c pm_lock.c
|
2019-11-09 16:09:33 +01:00
|
|
|
|
2022-06-20 12:16:42 +02:00
|
|
|
ifeq ($(CONFIG_PM_PROCFS),y)
|
|
|
|
|
|
|
|
CSRCS += pm_procfs.c
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2019-11-09 16:09:33 +01:00
|
|
|
# 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 21:24:27 +02:00
|
|
|
|
2012-01-22 19:03:13 +01:00
|
|
|
# Include power management in the build
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2012-01-22 19:03:13 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-07-23 15:35:09 +02: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 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2017-07-23 15:35:09 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2017-09-10 19:43:20 +02:00
|
|
|
# Add powerled support
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_DRIVERS_POWERLED),y)
|
|
|
|
|
|
|
|
CSRCS += powerled.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
2021-11-25 10:48:58 +01:00
|
|
|
POWER_VPATH := :power
|
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_REGULATOR), y)
|
|
|
|
|
|
|
|
CSRCS += regulator.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
2021-11-25 10:48:58 +01:00
|
|
|
POWER_VPATH := :power
|
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_REGULATOR_RPMSG), y)
|
|
|
|
|
|
|
|
CSRCS += regulator_rpmsg.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
2021-12-02 03:36:49 +01:00
|
|
|
POWER_VPATH := :power
|
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_REGULATOR_GPIO), y)
|
|
|
|
|
|
|
|
CSRCS += regulator_gpio.c
|
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
2017-09-10 19:43:20 +02:00
|
|
|
POWER_VPATH := :power
|
2020-03-26 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2017-09-10 19:43:20 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2015-09-20 17:47:00 +02:00
|
|
|
# Add battery charger drivers
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2015-09-19 21:06:43 +02:00
|
|
|
ifeq ($(CONFIG_BATTERY_CHARGER),y)
|
2015-09-20 17:47:00 +02:00
|
|
|
|
2015-09-19 21:06:43 +02:00
|
|
|
CSRCS += battery_charger.c
|
2015-09-20 17:47:00 +02:00
|
|
|
|
2018-12-31 19:56:56 +01:00
|
|
|
# Add the MCP73871 battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_MCP73871),y)
|
|
|
|
CSRCS += mcp73871.c
|
|
|
|
endif
|
|
|
|
|
2015-09-20 17:47:00 +02: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 15:26:00 +02:00
|
|
|
# Add the BQ2429x I2C-based battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C_BQ2429X),y)
|
|
|
|
CSRCS += bq2429x.c
|
|
|
|
endif
|
|
|
|
|
2021-09-07 04:26:58 +02:00
|
|
|
# Add the axp202 I2C-based battery charger driver
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C_AXP202),y)
|
|
|
|
CSRCS += axp202.c
|
|
|
|
endif
|
|
|
|
|
2015-09-19 21:06:43 +02:00
|
|
|
endif
|
|
|
|
|
2017-07-23 15:35:09 +02:00
|
|
|
# Include power support in the build
|
2015-09-20 17:47:00 +02:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2015-09-20 17:47:00 +02:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
# Add battery gauge drivers
|
|
|
|
|
2015-09-19 19:00:14 +02:00
|
|
|
ifeq ($(CONFIG_BATTERY_GAUGE),y)
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2015-09-19 19:00:14 +02:00
|
|
|
CSRCS += battery_gauge.c
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2015-09-20 17:47:00 +02:00
|
|
|
# Add I2C-based battery gauge drivers
|
2012-01-22 17:42:49 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_I2C),y)
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2020-02-22 19:31:14 +01:00
|
|
|
# Add the MAX1704x I2C-based battery gauge driver
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2012-01-22 17:42:49 +01:00
|
|
|
ifeq ($(CONFIG_I2C_MAX1704X),y)
|
|
|
|
CSRCS += max1704x.c
|
|
|
|
endif
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2021-02-25 14:34:37 +01:00
|
|
|
# Add the bq27426 I2C-based battery gauge driver
|
2020-08-20 06:07:22 +02:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_BQ27426),y)
|
|
|
|
CSRCS += bq27426.c
|
|
|
|
endif
|
|
|
|
|
2012-01-22 19:03:13 +01:00
|
|
|
endif
|
|
|
|
|
2020-02-23 09:50:23 +01:00
|
|
|
# Include battery support in the build
|
2012-01-22 19:03:13 +01:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2012-01-22 19:03:13 +01:00
|
|
|
|
2012-01-22 17:42:49 +01:00
|
|
|
endif
|
|
|
|
|
2020-02-29 01:17:27 +01: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 14:34:37 +01:00
|
|
|
# Include battery support in the build
|
2020-02-29 01:17:27 +01:00
|
|
|
|
|
|
|
POWER_DEPPATH := --dep-path power
|
|
|
|
POWER_VPATH := :power
|
2020-03-26 04:51:22 +01:00
|
|
|
POWER_CFLAGS := ${shell $(INCDIR) "$(CC)" $(TOPDIR)$(DELIM)drivers$(DELIM)power}
|
2020-02-29 01:17:27 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
2011-09-04 21:24:27 +02:00
|
|
|
# Include power management in the build
|
|
|
|
|
2012-01-22 19:03:13 +01:00
|
|
|
DEPPATH += $(POWER_DEPPATH)
|
|
|
|
VPATH += $(POWER_VPATH)
|
2012-01-23 18:19:43 +01:00
|
|
|
CFLAGS += $(POWER_CFLAGS)
|