summaryrefslogtreecommitdiff
path: root/zephyr/Kconfig.led
blob: f57d03d3a588fee371571165ba52f90f4b243c70 (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
# 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 the led_get_brightness_range() and
	  led_set_brightness() which are 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_LED_PWM_COUNT
	int "Number of PWM LEDs"
	default 1
	help
	  This sets the number of PWM LEDs that are controlled by the common
	  PWM LED policy. The maximum number of PWM LEDs is currently 2.

	  TODO(b/177452529): Set this parameter from the device tree.

config PLATFORM_EC_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