summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.led
blob: 6e0eeb8aa5a59d021b1a9d9e5dfe6fd0cdb31f16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
# Copyright 2021 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

menuconfig PLATFORM_EC_LED_COMMON
	bool "LED Support"
	help
	  Enable the common LED module supporting automatic control of the
	  battery and power LEDs.

if PLATFORM_EC_LED_COMMON

# TODO: Add other choices
#  CONFIG_LED_POLICY_STD
#  CONFIG_LED_PWM_CHARGE_STATE_ONLY
#  CONFIG_LED_PWM_ACTIVE_CHARGE_PORT_ONLY
#  CONFIG_LED_ONOFF_STATES

config PLATFORM_EC_LED_PWM
	bool "PWM (Pulse Width Modulation) LEDs"
	depends on PLATFORM_EC_PWM
	help
	  Enable PWM (Pulse Width Modulation) controlled LEDs that conform to
	  the Chromium OS LED behavior specification.

	  Your board files must implement led_set_brightness() function, which
	  is used by the LED PWM module to set the board LEDs in response to
	  power and charging events.

if PLATFORM_EC_LED_PWM

config PLATFORM_EC_CONSOLE_CMD_LEDTEST
	bool "Console command: ledtest"
	default y
	help
	  Enable the "ledtest" command. This command lets you override the
	  automatic control of the platform LEDs. For example:

	    ledtest 0 enable red

	  disables automatic control of the first PWM LED and forces the LED
	  color to red.  Set the 2nd parameter to "disable" to return back
	  to automatic control:

	    ledtest 0 disable

config PLATFORM_EC_LED_PWM_CHARGE_COLOR
	int "Battery charging LED color"
	default 5
	range 0 5
	help
	  Configure the color of LED when battery is charging:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

config PLATFORM_EC_LED_PWM_CHARGE_ERROR_COLOR
	int "Charging error LED color"
	default 0
	range 0 5
	help
	  Configure the color of LED when Charging error or battery not present:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

config PLATFORM_EC_LED_PWM_NEAR_FULL_COLOR
	int "Battery almost full LED color"
	default 1
	range 0 5
	help
	  Configure the color of LED when charge battery is almost full:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

config PLATFORM_EC_LED_PWM_SOC_ON_COLOR
	int "AP powered on LED color"
	default 1
	range 0 5
	help
	  Configure the color of LED when AP powered on:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

config PLATFORM_EC_LED_PWM_SOC_SUSPEND_COLOR
	int "AP suspended LED color"
	default 1
	range 0 5
	help
	  Configure the color of LED when AP suspended:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

config PLATFORM_EC_LED_PWM_LOW_BATT_COLOR
	int "Low battery LED color"
	default 5
	range 0 5
	help
	  Configure the color of LED when battery is low:
	    0 - EC_LED_COLOR_RED
	    1 - EC_LED_COLOR_GREEN
	    2 - EC_LED_COLOR_BLUE
	    3 - EC_LED_COLOR_YELLOW
	    4 - EC_LED_COLOR_WHITE
	    5 - EC_LED_COLOR_AMBER

	  This value is mapped directly to enum ec_led_colors.

endif # PLATFORM_EC_LED_PWM

config PLATFORM_EC_LED_ONOFF_STATES
	bool "EC LED On-Off States"
	help
	  Enable EC Standard LED On-Off state code that conforms to the
	  Chromium OS LED On-Off state behavior.

if PLATFORM_EC_LED_ONOFF_STATES

config PLATFORM_EC_LED_ONOFF_STATES_BAT_LOW
	int "EC LED On-Off State Battery Low Percentage"
	default 10
	help
	  Enable EC Standard LED On-Off bettery low percentage
	  for standard Chromium OS LED On-Off battery low
	  state behavior.

endif # PLATFORM_EC_LED_ONOFF_STATES

endif # PLATFORM_EC_LED_COMMON