# 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_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