Home
last modified time | relevance | path

Searched full:led (Results 1 – 25 of 2819) sorted by relevance

12345678910>>...113

/openbmc/linux/sound/usb/caiaq/
H A Dcontrol.c167 { "LED left", 2 },
168 { "LED middle", 1 },
169 { "LED right", 0 },
170 { "LED ring", 3 }
174 { "LED 1", 5 },
175 { "LED 2", 4 },
176 { "LED 3", 3 },
177 { "LED 4", 2 },
178 { "LED 5", 1 },
179 { "LED 6", 0 },
[all …]
/openbmc/linux/drivers/leds/
H A Dleds-bd2802.c3 * leds-bd2802.c - RGB LED Driver
73 struct led_state led[2]; member
108 static inline int bd2802_is_rgb_off(struct bd2802_led *led, enum led_ids id, in bd2802_is_rgb_off() argument
113 return !led->led[id].r; in bd2802_is_rgb_off()
115 return !led->led[id].g; in bd2802_is_rgb_off()
117 return !led->led[id].b; in bd2802_is_rgb_off()
119 dev_err(&led->client->dev, "%s: Invalid color\n", __func__); in bd2802_is_rgb_off()
124 static inline int bd2802_is_led_off(struct bd2802_led *led, enum led_ids id) in bd2802_is_led_off() argument
126 if (led->led[id].r || led->led[id].g || led->led[id].b) in bd2802_is_led_off()
132 static inline int bd2802_is_all_off(struct bd2802_led *led) in bd2802_is_all_off() argument
[all …]
H A DKconfig10 bool "LED Support"
12 Say Y to enable Linux LED support. This allows control of supported
18 tristate "LED Class Support"
20 This option enables the LED sysfs class in /sys/class/leds. You'll
24 tristate "LED Flash Class Support"
27 This option enables the flash LED sysfs class in /sys/class/leds.
28 It wraps LED Class and adds flash LEDs specific sysfs attributes
30 for the flash related features of a LED device. It can be built
34 tristate "LED Multicolor Class Support"
37 This option enables the multicolor LED sysfs class in /sys/class/leds.
[all …]
H A Dleds-lm3692x.c2 // TI LM3692x LED chip family driver
101 * @led_dev: LED class device pointer
104 * @regulator: LED supply regulator pointer
105 * @led_enable: LED sync to be enabled
145 static int lm3692x_fault_check(struct lm3692x_led *led) in lm3692x_fault_check() argument
150 ret = regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
155 dev_err(&led->client->dev, "Detected a fault 0x%X\n", read_buf); in lm3692x_fault_check()
160 regmap_read(led->regmap, LM3692X_FAULT_FLAGS, &read_buf); in lm3692x_fault_check()
162 dev_err(&led->client->dev, "Second read of fault flags 0x%X\n", in lm3692x_fault_check()
168 static int lm3692x_leds_enable(struct lm3692x_led *led) in lm3692x_leds_enable() argument
[all …]
H A Dleds-cpcap.c52 /* camera privacy led */
62 struct led_classdev led; member
81 static int cpcap_led_set_power(struct cpcap_led *led, bool status) in cpcap_led_set_power() argument
85 if (status == led->powered) in cpcap_led_set_power()
89 err = regulator_enable(led->vdd); in cpcap_led_set_power()
91 err = regulator_disable(led->vdd); in cpcap_led_set_power()
94 dev_err(led->dev, "regulator failure: %d", err); in cpcap_led_set_power()
98 led->powered = status; in cpcap_led_set_power()
105 struct cpcap_led *led = container_of(ledc, struct cpcap_led, led); in cpcap_led_set() local
109 mutex_lock(&led->update_lock); in cpcap_led_set()
[all …]
H A Dleds-max8997.c3 * leds-max8997.c - LED class driver for MAX8997 LEDs.
47 static void max8997_led_set_mode(struct max8997_led *led, in max8997_led_set_mode() argument
51 struct i2c_client *client = led->iodev->i2c; in max8997_led_set_mode()
57 val = led->id ? in max8997_led_set_mode()
59 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode()
63 val = led->id ? in max8997_led_set_mode()
65 led->cdev.max_brightness = MAX8997_LED_MOVIE_MAX_BRIGHTNESS; in max8997_led_set_mode()
70 val = led->id ? in max8997_led_set_mode()
72 led->cdev.max_brightness = MAX8997_LED_FLASH_MAX_BRIGHTNESS; in max8997_led_set_mode()
77 val = led->id ? in max8997_led_set_mode()
[all …]
H A Dleds-ns2.c3 * leds-ns2.c - Driver for the Network Space v2 (and parents) dual-GPIO LED
39 * The Network Space v2 dual-GPIO LED is wired to a CPLD. Three different LED
40 * modes are available: off, on and SATA activity blinking. The LED modes are
42 * for the command/slow GPIOs corresponds to a LED mode.
56 static int ns2_led_get_mode(struct ns2_led *led, enum ns2_led_modes *mode) in ns2_led_get_mode() argument
62 cmd_level = gpiod_get_value_cansleep(led->cmd); in ns2_led_get_mode()
63 slow_level = gpiod_get_value_cansleep(led->slow); in ns2_led_get_mode()
65 for (i = 0; i < led->num_modes; i++) { in ns2_led_get_mode()
66 if (cmd_level == led->modval[i].cmd_level && in ns2_led_get_mode()
67 slow_level == led->modval[i].slow_level) { in ns2_led_get_mode()
[all …]
H A Dleds-wm8350.c3 * LED driver for WM8350 driven LEDS.
88 static int wm8350_led_enable(struct wm8350_led *led) in wm8350_led_enable() argument
92 if (led->enabled) in wm8350_led_enable()
95 ret = regulator_enable(led->isink); in wm8350_led_enable()
97 dev_err(led->cdev.dev, "Failed to enable ISINK: %d\n", ret); in wm8350_led_enable()
101 ret = regulator_enable(led->dcdc); in wm8350_led_enable()
103 dev_err(led->cdev.dev, "Failed to enable DCDC: %d\n", ret); in wm8350_led_enable()
104 regulator_disable(led->isink); in wm8350_led_enable()
108 led->enabled = 1; in wm8350_led_enable()
113 static int wm8350_led_disable(struct wm8350_led *led) in wm8350_led_disable() argument
[all …]
H A Dleds-lm3697.c2 // TI LM3697 LED chip family driver
48 * @hvled_strings: Array of LED strings associated with a control bank
49 * @label: LED label
50 * @led_dev: LED class device
53 * @control_bank: Control bank the LED is associated to. 0 is control bank A
55 * @enabled: LED brightness level (or LED_OFF)
72 * @regulator: LED supply regulator pointer
77 * @leds: Array of LED strings
125 struct lm3697_led *led = container_of(led_cdev, struct lm3697_led, in lm3697_brightness_set() local
127 int ctrl_en_val = (1 << led->control_bank); in lm3697_brightness_set()
[all …]
/openbmc/phosphor-led-manager/test/
H A Dled-test-map.hpp4 static const phosphor::led::GroupMap singleLedOn = {
8 {"One", phosphor::led::Layout::Action::On, 0, 0,
9 phosphor::led::Layout::Action::Blink},
13 static const phosphor::led::GroupMap singleLedBlink = {
17 {"One", phosphor::led::Layout::Action::Blink, 0, 0,
18 phosphor::led::Layout::Action::Blink},
22 static const phosphor::led::GroupMap singleLedBlinkOverrideOn = {
26 {"One", phosphor::led::Layout::Action::Blink, 0, 0,
27 phosphor::led::Layout::Action::On},
31 static const phosphor::led::GroupMap multipleLedsOn = {
[all …]
/openbmc/openbmc/meta-quanta/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/
H A Dnvme_config.json6 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_fault",
7 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_locate",
8 … "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_0_locate",
9 "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_0_locate",
16 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_fault",
17 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_locate",
18 … "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_1_locate",
19 "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_1_locate",
26 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_2_fault",
27 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_2_locate",
[all …]
H A Dnvme_json_rewrite.sh43 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_fault",
44 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_0_locate",
45 … "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_0_locate",
46 "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_0_locate",
53 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_fault",
54 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_1_locate",
55 … "NVMeDriveLocateLEDControllerBusName": "xyz.openbmc_project.LED.Controller.led_u2_1_locate",
56 "NVMeDriveLocateLEDControllerPath": "/xyz/openbmc_project/led/physical/led_u2_1_locate",
63 "NVMeDriveFaultLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_2_fault",
64 "NVMeDriveLocateLEDGroupPath": "/xyz/openbmc_project/led/groups/led_u2_2_locate",
[all …]
/openbmc/linux/drivers/leds/flash/
H A Dleds-lm3601x.c2 // Flash and torch driver for Texas Instruments LM3601X LED
9 #include <linux/led-class-flash.h>
74 * @fled_cdev: flash LED class device pointer
78 * @led_name: LED label for the Torch or IR LED
135 static int lm3601x_read_faults(struct lm3601x_led *led) in lm3601x_read_faults() argument
140 ret = regmap_read(led->regmap, LM3601X_FLAGS_REG, &flags_val); in lm3601x_read_faults()
144 led->last_flag = 0; in lm3601x_read_faults()
147 led->last_flag |= LED_FAULT_OVER_VOLTAGE; in lm3601x_read_faults()
150 led->last_flag |= LED_FAULT_OVER_TEMPERATURE; in lm3601x_read_faults()
153 led->last_flag |= LED_FAULT_SHORT_CIRCUIT; in lm3601x_read_faults()
[all …]
H A Dleds-aat1290.c3 * LED Flash class driver for the AAT1290
12 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
49 /* maximum LED current in movie mode */
51 /* maximum LED current in flash mode */
57 /* max LED brightness level */
67 /* corresponding LED Flash class device */
96 static void aat1290_as2cwire_write(struct aat1290_led *led, int addr, int value) in aat1290_as2cwire_write() argument
100 gpiod_direction_output(led->gpio_fl_en, 0); in aat1290_as2cwire_write()
101 gpiod_direction_output(led->gpio_en_set, 0); in aat1290_as2cwire_write()
[all …]
H A Dleds-ktd2692.c3 * LED driver : leds-ktd2692.c
12 #include <linux/led-class-flash.h>
64 /* maximum LED current in movie mode */
66 /* maximum LED current in flash mode */
70 /* max LED brightness level */
75 /* Related LED Flash class device */
95 static void ktd2692_expresswire_start(struct ktd2692_context *led) in ktd2692_expresswire_start() argument
97 gpiod_direction_output(led->ctrl_gpio, KTD2692_HIGH); in ktd2692_expresswire_start()
101 static void ktd2692_expresswire_reset(struct ktd2692_context *led) in ktd2692_expresswire_reset() argument
103 gpiod_direction_output(led->ctrl_gpio, KTD2692_LOW); in ktd2692_expresswire_reset()
[all …]
H A Dleds-max77693.c3 * LED Flash class driver for the flash cell of max77693 mfd.
11 #include <linux/led-class-flash.h>
20 #include <media/v4l2-flash-led-class.h>
59 /* corresponding LED Flash class device */
80 /* sub led data */
140 static inline bool max77693_fled_used(struct max77693_led_device *led, in max77693_fled_used() argument
145 return led->fled_mask & fled_bit; in max77693_fled_used()
148 static int max77693_set_mode_reg(struct max77693_led_device *led, u8 mode) in max77693_set_mode_reg() argument
150 struct regmap *rmap = led->regmap; in max77693_set_mode_reg()
163 * camera sensors use torch led to fathom ambient light in max77693_set_mode_reg()
[all …]
/openbmc/u-boot/drivers/led/
H A DKconfig1 menu "LED Support"
3 config LED config
4 bool "Enable LED support"
8 U-Boot provides a uclass API to implement this feature. LED drivers
13 bool "LED Support for BCM6328"
14 depends on LED && ARCH_BMIPS
17 LED HW controller accessed via MMIO registers.
20 means that if one LED is set to blink at 100ms and then a different
21 LED is set to blink at 200ms, both will blink at 200ms.
24 bool "LED Support for BCM6358"
[all …]
/openbmc/linux/Documentation/devicetree/bindings/leds/
H A Dcommon.yaml14 LED and flash LED devices provide the same basic functionality as current
15 regulators, but extended with LED and flash LED specific features like
18 Many LED devices expose more than one current output that can be connected
19 to one or more discrete LED component. Since the arrangement of connections
20 can influence the way of the LED device initialization, the LED components
21 have to be tightly coupled with the LED device binding. They are represented
22 by child nodes of the parent LED device binding.
25 led-sources:
27 List of device current outputs the LED is connected to. The outputs are
28 identified by the numbers that must be defined in the LED device binding
[all …]
/openbmc/docs/architecture/
H A DLED-architecture.md1 # LED Support for OpenBMC
3 This document describes how to add LED support for your machine based upon the
4 OpenBMC [LED Architecture][led d-bus readme] document. LED group management is
11 Service xyx.openbmc_project.LED.GroupManager
12 Path /xyz/openbmc_project/led/groups/<label>
13 Interfaces xyz.openbmc_project.Led.Group
22 PUT /xyz/openbmc_project/led/groups/<group>/attr/Asserted
25 The LED group state can be changed by setting the Asserted value to boolean 0
30 https://${bmc}/xyz/openbmc_project/led/groups/lamp_test/attr/Asserted
39 resource. This is for LED Identify operation only.
[all …]
/openbmc/phosphor-led-sysfs/test/
H A Dphysical.cpp10 constexpr auto ledObj = "/foo/bar/led";
12 using Action = sdbusplus::xyz::openbmc_project::Led::server::Physical::Action;
44 class MockLed : public phosphor::led::SysfsLed
79 auto led = std::make_unique<NiceMock<MockLed>>(); in TEST() local
80 ON_CALL(*led, getTrigger()).WillByDefault(Return("none")); in TEST()
81 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST()
89 auto led = std::make_unique<NiceMock<MockLed>>(); in TEST() local
90 EXPECT_CALL(*led, getTrigger()).WillRepeatedly(Return("none")); in TEST()
91 EXPECT_CALL(*led, getBrightness()).WillOnce(Return(127)); in TEST()
92 EXPECT_CALL(*led, getMaxBrightness()).WillOnce(Return(127)); in TEST()
[all …]
/openbmc/pldm/configurations/pdr/com.ibm.Hardware.Chassis.Model.Rainier4U/
H A D4.json18 "path": "/xyz/openbmc_project/led/physical/virtual_enc_id",
19 "interface": "xyz.openbmc_project.Led.Physical",
23 "xyz.openbmc_project.Led.Physical.Action.Off",
24 … "xyz.openbmc_project.Led.Physical.Action.On || xyz.openbmc_project.Led.Physical.Action.Blink"
62 "path": "/xyz/openbmc_project/led/groups/base_blyth_identify",
63 "interface": "xyz.openbmc_project.Led.Group",
81 "path": "/xyz/openbmc_project/led/groups/bmc_ingraham_identify",
82 "interface": "xyz.openbmc_project.Led.Group",
100 … "path": "/xyz/openbmc_project/led/groups/cablecard0_cxp_bot_identify",
101 "interface": "xyz.openbmc_project.Led.Group",
[all …]
/openbmc/pldm/configurations/pdr/com.ibm.Hardware.Chassis.Model.Rainier1S4U/
H A D4.json18 "path": "/xyz/openbmc_project/led/physical/virtual_enc_id",
19 "interface": "xyz.openbmc_project.Led.Physical",
23 "xyz.openbmc_project.Led.Physical.Action.Off",
24 … "xyz.openbmc_project.Led.Physical.Action.On || xyz.openbmc_project.Led.Physical.Action.Blink"
62 "path": "/xyz/openbmc_project/led/groups/base_blyth_identify",
63 "interface": "xyz.openbmc_project.Led.Group",
81 "path": "/xyz/openbmc_project/led/groups/bmc_ingraham_identify",
82 "interface": "xyz.openbmc_project.Led.Group",
100 … "path": "/xyz/openbmc_project/led/groups/cablecard10_cxp_bot_identify",
101 "interface": "xyz.openbmc_project.Led.Group",
[all …]
/openbmc/linux/drivers/net/wireless/broadcom/b43/
H A Dleds.c5 LED control
48 struct b43_led *led) in b43_led_update() argument
53 if (!led->wl) in b43_led_update()
58 /* The led->state read is racy, but we don't care. In case we raced in b43_led_update()
62 turn_on = atomic_read(&led->state) != LED_OFF; in b43_led_update()
65 if (turn_on == led->hw_state) in b43_led_update()
67 led->hw_state = turn_on; in b43_led_update()
70 b43_led_turn_on(dev, led->index, led->activelow); in b43_led_update()
72 b43_led_turn_off(dev, led->index, led->activelow); in b43_led_update()
95 /* Callback from the LED subsystem. */
[all …]
/openbmc/docs/designs/
H A Dmultihost-physical-led.md1 # Physical LED Design Support
12 The existing phosphor-led-sysfs design exposes one service per LED configuration
20 For example, Power LED and System Identification LED combines into a single
21 bicolor blue-yellow LED per host. A total of 4 × LEDs will be placed along the
25 Depending on the status of each host, blue or yellow LED needs to be Blink, OFF
26 or ON and other LEDs needs to be in OFF state. Therefore, bi-color LED needs to
29 Based on the current design in phosphor-led-sysfs application, pairing groups
30 will be difficult, since it exposes one service per LED. To abstract this method
35 The below diagram represents the overview for current physical LED design.
39 KERNEL META-PHOSPHOR PHOSPHOR-LED-SYSFS SERVICE
[all …]
/openbmc/pldm/configurations/pdr/com.ibm.Hardware.Chassis.Model.Rainier2U/
H A D4.json18 "path": "/xyz/openbmc_project/led/physical/virtual_enc_id",
19 "interface": "xyz.openbmc_project.Led.Physical",
23 "xyz.openbmc_project.Led.Physical.Action.Off",
24 … "xyz.openbmc_project.Led.Physical.Action.On || xyz.openbmc_project.Led.Physical.Action.Blink"
62 "path": "/xyz/openbmc_project/led/groups/base_blyth_identify",
63 "interface": "xyz.openbmc_project.Led.Group",
81 "path": "/xyz/openbmc_project/led/groups/bmc_ingraham_identify",
82 "interface": "xyz.openbmc_project.Led.Group",
100 … "path": "/xyz/openbmc_project/led/groups/cablecard0_cxp_bot_identify",
101 "interface": "xyz.openbmc_project.Led.Group",
[all …]

12345678910>>...113