diff options
-rw-r--r-- | common/build.mk | 3 | ||||
-rw-r--r-- | include/throttle_ap.h | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/common/build.mk b/common/build.mk index bd1bccdc82..15669a5dfe 100644 --- a/common/build.mk +++ b/common/build.mk @@ -9,7 +9,6 @@ common-y=main.o util.o console_output.o uart_buffering.o common-y+=memory_commands.o shared_mem.o system.o hooks.o common-y+=gpio.o version.o printf.o queue.o -common-y+=throttle_ap.o common-$(CONFIG_BACKLIGHT_LID)+=backlight_lid.o # TODO(rspangler): Why do these include battery_common but the other batteries @@ -52,7 +51,7 @@ common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o thermal.o common-$(CONFIG_USB_PORT_POWER_DUMB)+=usb_port_power_dumb.o common-$(CONFIG_USB_PORT_POWER_SMART)+=usb_port_power_smart.o common-$(CONFIG_WIRELESS)+=wireless.o -common-$(HAS_TASK_CHIPSET)+=chipset.o +common-$(HAS_TASK_CHIPSET)+=chipset.o throttle_ap.o common-$(HAS_TASK_CONSOLE)+=console.o common-$(HAS_TASK_HOSTCMD)+=host_command.o host_event_commands.o common-$(HAS_TASK_KEYSCAN)+=keyboard_scan.o diff --git a/include/throttle_ap.h b/include/throttle_ap.h index e66a5c6bec..54a4b9fc40 100644 --- a/include/throttle_ap.h +++ b/include/throttle_ap.h @@ -33,7 +33,6 @@ enum throttle_sources { THROTTLE_SRC_POWER, }; - /** * Enable/disable CPU throttling. * @@ -44,8 +43,16 @@ enum throttle_sources { * @param type Type of throttling desired * @param source Which task is requesting throttling */ +#ifdef HAS_TASK_CHIPSET void throttle_ap(enum throttle_level level, enum throttle_type type, enum throttle_sources source); +#else +static inline void throttle_ap(enum throttle_level level, + enum throttle_type type, + enum throttle_sources source) +{} +#endif + #endif /* __CROS_EC_THROTTLE_AP_H */ |