summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-11-05 23:44:43 +0000
committerFlorian Didron <fdidron@users.noreply.github.com>2020-01-09 08:57:11 +0900
commit50c6d1e178d7d250ccc728f8da4b61f98e201d3a (patch)
tree76690d9c8aef6fe04b22d6b3f72e11fe41f93be0
parent8c273cd0f2c5b5e0399e88aec65121911cde79c0 (diff)
Convert backlight to follow driver rules pattern
-rw-r--r--common_features.mk15
-rw-r--r--quantum/stm32/proton_c.mk4
2 files changed, 9 insertions, 10 deletions
diff --git a/common_features.mk b/common_features.mk
index 438e120295..34ec833474 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -231,15 +231,16 @@ endif
# backward compat
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
- BACKLIGHT_ENABLE = custom
+ BACKLIGHT_DRIVER = custom
endif
-VALID_BACKLIGHT_TYPES := yes software custom
+VALID_BACKLIGHT_TYPES := pwm software custom
BACKLIGHT_ENABLE ?= no
-ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
- ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),)
- $(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type)
+BACKLIGHT_DRIVER ?= pwm
+ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
+ ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
+ $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
endif
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
@@ -250,10 +251,10 @@ ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
SRC += $(QUANTUM_DIR)/backlight/backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE
- ifeq ($(strip $(BACKLIGHT_ENABLE)), software)
+ ifeq ($(strip $(BACKLIGHT_DRIVER)), software)
SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
else
- ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
+ ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
endif
diff --git a/quantum/stm32/proton_c.mk b/quantum/stm32/proton_c.mk
index 193e09ca1e..ad73e81355 100644
--- a/quantum/stm32/proton_c.mk
+++ b/quantum/stm32/proton_c.mk
@@ -5,9 +5,7 @@ AUDIO_ENABLE = yes
RGBLIGHT_ENABLE = no
# Force task driven PWM until ARM can provide automatic configuration
-ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
- BACKLIGHT_ENABLE = software
-endif
+BACKLIGHT_DRIVER = software
# The rest of these settings shouldn't change