summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.led
blob: 8955675d9261df7edd38f397101c65e0d8f4aa2e (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
# 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

endif # PLATFORM_EC_LED_PWM
endif # PLATFORM_EC_LED_COMMON