/openbmc/phosphor-led-manager/test/ |
H A D | led-test-map.hpp | 4 static const phosphor::led::GroupMap singleLedOn = { 9 phosphor::led::Layout::Action::Blink}, 18 phosphor::led::Layout::Action::Blink}, 27 phosphor::led::Layout::Action::On}, 36 phosphor::led::Layout::Action::On}, 38 phosphor::led::Layout::Action::On}, 40 phosphor::led::Layout::Action::On}, 66 phosphor::led::Layout::Action::On}, 120 static const phosphor::led::GroupMap 192 static const phosphor::led::GroupMap [all …]
|
H A D | utest.cpp | 10 using namespace phosphor::led; 40 phosphor::led::Layout::Action::Blink}, in TEST_F() 72 phosphor::led::Layout::Action::Blink}, in TEST_F() 104 phosphor::led::Layout::Action::Blink}, in TEST_F() 150 phosphor::led::Layout::Action::On}, in TEST_F() 152 phosphor::led::Layout::Action::On}, in TEST_F() 154 phosphor::led::Layout::Action::On}, in TEST_F() 371 phosphor::led::Layout::Action::On}, in TEST_F() 409 phosphor::led::Layout::Action::On}, in TEST_F() 441 phosphor::led::Layout::Action::On}, in TEST_F() [all …]
|
/openbmc/linux/drivers/leds/ |
H A D | leds-bd2802.c | 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() 126 if (led->led[id].r || led->led[id].g || led->led[id].b) in bd2802_is_led_off() 527 bd2802_turn_off(led, led->led_id, led->color); \ 743 if (led->led[i].r) in bd2802_restore_state() 744 bd2802_turn_on(led, i, RED, led->led[i].r); in bd2802_restore_state() 745 if (led->led[i].g) in bd2802_restore_state() 746 bd2802_turn_on(led, i, GREEN, led->led[i].g); in bd2802_restore_state() 747 if (led->led[i].b) in bd2802_restore_state() [all …]
|
H A D | leds-lm3692x.c | 173 if (led->enabled) in lm3692x_leds_enable() 176 if (led->regulator) { in lm3692x_leds_enable() 185 if (led->enable_gpio) in lm3692x_leds_enable() 225 ret = regmap_write(led->regmap, LM3692X_BOOST_CTRL, led->boost_ctrl); in lm3692x_leds_enable() 278 led->enabled = true; in lm3692x_leds_enable() 300 if (!led->enabled) in lm3692x_leds_disable() 384 led->enable_gpio = devm_gpiod_get_optional(&led->client->dev, in lm3692x_probe_dt() 393 led->regulator = devm_regulator_get_optional(&led->client->dev, "vled"); in lm3692x_probe_dt() 450 ret = devm_led_classdev_register_ext(&led->client->dev, &led->led_dev, in lm3692x_probe_dt() 465 led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); in lm3692x_probe() [all …]
|
H A D | leds-wm8350.c | 92 if (led->enabled) in wm8350_led_enable() 108 led->enabled = 1; in wm8350_led_enable() 117 if (!led->enabled) in wm8350_led_disable() 136 led->enabled = 0; in wm8350_led_disable() 149 led->value = value; in wm8350_led_set() 163 uA = (led->max_uA_index * led->value) / LED_FULL; in wm8350_led_set() 182 led->value = LED_OFF; in wm8350_led_shutdown() 216 led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); in wm8350_led_probe() 217 if (led == NULL) in wm8350_led_probe() 225 led->isink = isink; in wm8350_led_probe() [all …]
|
H A D | leds-cpcap.c | 105 struct cpcap_led *led = container_of(ledc, struct cpcap_led, led); in cpcap_led_set() local 120 led->info->reg, led->info->mask, CPCAP_LED_NO_CURRENT); in cpcap_led_set() 131 err = regmap_update_bits(led->regmap, led->info->reg, led->info->mask, in cpcap_led_set() 164 led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); in cpcap_led_probe() 165 if (!led) in cpcap_led_probe() 177 if (!led->regmap) in cpcap_led_probe() 194 err = regmap_update_bits(led->regmap, led->info->reg, in cpcap_led_probe() 195 led->info->init_mask, led->info->init_val); in cpcap_led_probe() 204 led->led.max_brightness = led->info->limit; in cpcap_led_probe() 205 led->led.brightness_set_blocking = cpcap_led_set; in cpcap_led_probe() [all …]
|
H A D | leds-max8997.c | 57 val = led->id ? in max8997_led_set_mode() 63 val = led->id ? in max8997_led_set_mode() 70 val = led->id ? in max8997_led_set_mode() 77 val = led->id ? in max8997_led_set_mode() 94 led->led_mode = mode; in max8997_led_set_mode() 113 led->enabled = enable; in max8997_led_enable() 241 led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); in max8997_led_probe() 242 if (led == NULL) in max8997_led_probe() 245 led->id = pdev->id; in max8997_led_probe() 248 led->cdev.name = name; in max8997_led_probe() [all …]
|
H A D | leds-ns2.c | 90 if (!led->can_sleep) { in ns2_led_set_mode() 91 gpiod_set_value(led->cmd, led->modval[i].cmd_level); in ns2_led_set_mode() 92 gpiod_set_value(led->slow, led->modval[i].slow_level); in ns2_led_set_mode() 96 gpiod_set_value_cansleep(led->cmd, led->modval[i].cmd_level); in ns2_led_set_mode() 97 gpiod_set_value_cansleep(led->slow, led->modval[i].slow_level); in ns2_led_set_mode() 111 else if (led->sata) in ns2_led_set() 144 led->sata = enable; in ns2_led_sata_store() 185 if (IS_ERR(led->cmd)) in ns2_led_register() 213 led->can_sleep = gpiod_cansleep(led->cmd) || gpiod_cansleep(led->slow); in ns2_led_register() 214 if (led->can_sleep) in ns2_led_register() [all …]
|
H A D | leds-lp8860.c | 143 mutex_lock(&led->lock); in lp8860_unlock_eeprom() 207 struct lp8860_led *led = in lp8860_brightness_set() local 212 mutex_lock(&led->lock); in lp8860_brightness_set() 243 if (led->regulator) { in lp8860_init() 297 if (led->regulator) { in lp8860_init() 378 struct lp8860_led *led; in lp8860_probe() local 383 led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); in lp8860_probe() 384 if (!led) in lp8860_probe() 401 led->regulator = NULL; in lp8860_probe() 403 led->client = client; in lp8860_probe() [all …]
|
H A D | leds-regulator.c | 63 if (led->enabled) in regulator_led_enable() 72 led->enabled = 1; in regulator_led_enable() 79 if (!led->enabled) in regulator_led_disable() 88 led->enabled = 0; in regulator_led_disable() 98 mutex_lock(&led->mutex); in regulator_led_brightness_set() 116 regulator_led_enable(led); in regulator_led_brightness_set() 139 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in regulator_led_probe() 140 if (led == NULL) in regulator_led_probe() 159 led->vcc = vcc; in regulator_led_probe() 163 led->enabled = 1; in regulator_led_probe() [all …]
|
H A D | leds-lm3533.c | 61 return led->id + 2; in lm3533_led_get_ctrlbank_id() 66 return base + led->id; in lm3533_led_get_lv_reg() 71 return led->id; in lm3533_led_get_pattern() 90 mutex_lock(&led->mutex); in lm3533_led_pattern_enable() 113 mutex_unlock(&led->mutex); in lm3533_led_pattern_enable() 671 led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); in lm3533_led_probe() 672 if (!led) in lm3533_led_probe() 675 led->lm3533 = lm3533; in lm3533_led_probe() 683 led->id = pdev->id; in lm3533_led_probe() 692 led->cb.id = lm3533_led_get_ctrlbank_id(led); in lm3533_led_probe() [all …]
|
H A D | leds-el15203000.c | 97 led->reg, led->reg, brightness, brightness); in el15203000_cmd() 108 cmd[0] = led->reg; in el15203000_cmd() 151 led->reg, led->reg); in el15203000_pattern_set_S() 202 led->reg, led->reg); in el15203000_pattern_set_P() 207 led->reg, led->reg); in el15203000_pattern_set_P() 212 led->reg, led->reg); in el15203000_pattern_set_P() 217 led->reg, led->reg); in el15203000_pattern_set_P() 222 led->reg, led->reg); in el15203000_pattern_set_P() 258 led->priv = priv; in el15203000_probe_dt() 262 if (led->reg == 'S') { in el15203000_probe_dt() [all …]
|
H A D | leds-lm3697.c | 149 if (!led->enabled) { in lm3697_brightness_set() 270 (led->control_bank << led->hvled_strings[j]); in lm3697_probe_dt() 281 led->priv = priv; in lm3697_probe_dt() 282 led->led_dev.max_brightness = led->lmu_data.max_brightness; in lm3697_probe_dt() 305 struct lm3697 *led; in lm3697_probe() local 315 led = devm_kzalloc(dev, struct_size(led, leds, count), GFP_KERNEL); in lm3697_probe() 316 if (!led) in lm3697_probe() 322 led->client = client; in lm3697_probe() 323 led->dev = dev; in lm3697_probe() 350 if (led->enable_gpio) in lm3697_remove() [all …]
|
H A D | leds-wm831x-status.c | 49 led->reg_val |= led->src << WM831X_LED_SRC_SHIFT; in wm831x_status_set() 50 if (led->blink) { in wm831x_status_set() 52 led->reg_val |= led->blink_time << WM831X_LED_DUR_SHIFT; in wm831x_status_set() 53 led->reg_val |= led->blink_cyc; in wm831x_status_set() 61 wm831x_reg_write(led->wm831x, led->reg, led->reg_val); in wm831x_status_set() 75 led->blink = 0; in wm831x_status_brightness_set() 102 led->blink_time = 0; in wm831x_status_blink_set() 141 led->blink = 1; in wm831x_status_blink_set() 143 led->blink = 0; in wm831x_status_blink_set() 169 if (i == led->src) in src_show() [all …]
|
H A D | leds-spi-byte.c | 74 mutex_lock(&led->mutex); in spi_byte_brightness_set_blocking() 76 mutex_unlock(&led->mutex); in spi_byte_brightness_set_blocking() 85 struct spi_byte_led *led; in spi_byte_probe() local 95 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in spi_byte_probe() 96 if (!led) in spi_byte_probe() 100 strscpy(led->name, name, sizeof(led->name)); in spi_byte_probe() 101 led->spi = spi; in spi_byte_probe() 102 mutex_init(&led->mutex); in spi_byte_probe() 104 led->ldev.name = led->name; in spi_byte_probe() 106 led->ldev.max_brightness = led->cdef->max_value - led->cdef->off_value; in spi_byte_probe() [all …]
|
H A D | leds-bcm6328.c | 137 led->blink_leds[0] &= ~BIT(led->pin); in bcm6328_led_set() 138 led->blink_leds[1] &= ~BIT(led->pin); in bcm6328_led_set() 198 led->blink_leds[0] == BIT(led->pin) || in bcm6328_blink_set() 203 led->blink_leds[0] |= BIT(led->pin); in bcm6328_blink_set() 206 led->blink_leds[1] &= ~BIT(led->pin); in bcm6328_blink_set() 222 led->blink_leds[1] == BIT(led->pin) || in bcm6328_blink_set() 227 led->blink_leds[0] &= ~BIT(led->pin); in bcm6328_blink_set() 230 led->blink_leds[1] |= BIT(led->pin); in bcm6328_blink_set() 338 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in bcm6328_led() 339 if (!led) in bcm6328_led() [all …]
|
H A D | leds-cht-wcove.c | 115 ret = regmap_update_bits(led->regmap, led->regs->ctrl, in cht_wc_leds_brightness_set() 116 led->regs->on_off_mask, led->regs->off_val); in cht_wc_leds_brightness_set() 123 ret = regmap_update_bits(led->regmap, led->regs->fsm, in cht_wc_leds_brightness_set() 128 ret = regmap_write(led->regmap, led->regs->pwm, value); in cht_wc_leds_brightness_set() 134 ret = regmap_update_bits(led->regmap, led->regs->ctrl, in cht_wc_leds_brightness_set() 135 led->regs->on_off_mask, led->regs->on_val); in cht_wc_leds_brightness_set() 152 ret = regmap_read(led->regmap, led->regs->ctrl, &val); in cht_wc_leds_brightness_get() 165 ret = regmap_read(led->regmap, led->regs->pwm, &val); in cht_wc_leds_brightness_get() 237 ret = regmap_update_bits(led->regmap, led->regs->fsm, in cht_wc_leds_set_effect() 248 ret = regmap_update_bits(led->regmap, led->regs->fsm, in cht_wc_leds_set_effect() [all …]
|
/openbmc/linux/drivers/leds/flash/ |
H A D | leds-lm3601x.c | 144 led->last_flag = 0; in lm3601x_read_faults() 167 return led->last_flag; in lm3601x_read_faults() 177 mutex_lock(&led->lock); in lm3601x_brightness_set() 214 mutex_lock(&led->lock); in lm3601x_strobe_set() 250 mutex_lock(&led->lock); in lm3601x_flash_brightness_set() 274 mutex_lock(&led->lock); in lm3601x_flash_timeout_set() 289 mutex_lock(&led->lock); in lm3601x_strobe_get() 419 led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); in lm3601x_probe() 420 if (!led) in lm3601x_probe() 423 led->client = client; in lm3601x_probe() [all …]
|
H A D | leds-ktd2692.c | 162 mutex_lock(&led->lock); in ktd2692_led_brightness_set() 173 ktd2692_expresswire_write(led, led->mode | KTD2692_REG_MODE_BASE); in ktd2692_led_brightness_set() 174 mutex_unlock(&led->lock); in ktd2692_led_brightness_set() 186 mutex_lock(&led->lock); in ktd2692_led_flash_strobe_set() 200 ktd2692_expresswire_write(led, led->mode | KTD2692_REG_MODE_BASE); in ktd2692_led_flash_strobe_set() 291 led->regulator = NULL; in ktd2692_parse_dt() 293 if (led->regulator) { in ktd2692_parse_dt() 353 led = devm_kzalloc(&pdev->dev, sizeof(*led), GFP_KERNEL); in ktd2692_probe() 354 if (!led) in ktd2692_probe() 373 mutex_init(&led->lock); in ktd2692_probe() [all …]
|
H A D | leds-aat1290.c | 146 mutex_lock(&led->lock); in aat1290_led_brightness_set() 151 led->movie_mode = false; in aat1290_led_brightness_set() 153 if (!led->movie_mode) { in aat1290_led_brightness_set() 179 mutex_lock(&led->lock); in aat1290_led_flash_strobe_set() 196 led->movie_mode = false; in aat1290_led_flash_strobe_set() 318 led->mm_current_scale = devm_kzalloc(&led->pdev->dev, in init_mm_current_scale() 352 devm_kfree(&led->pdev->dev, led->mm_current_scale); in aat1290_led_get_configuration() 471 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in aat1290_led_probe() 472 if (!led) in aat1290_led_probe() 475 led->pdev = pdev; in aat1290_led_probe() [all …]
|
H A D | leds-max77693.c | 185 if (led->iout_joint) in max77693_add_mode() 206 ret = max77693_set_mode_reg(led, led->mode_flags); in max77693_add_mode() 223 if (led->iout_joint) in max77693_clear_mode() 229 return max77693_set_mode_reg(led, led->mode_flags); in max77693_clear_mode() 955 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in max77693_led_probe() 956 if (!led) in max77693_led_probe() 959 led->pdev = pdev; in max77693_led_probe() 976 led->iout_joint || max77693_fled_used(led, FLED1); in max77693_led_probe() 978 !led->iout_joint && max77693_fled_used(led, FLED2); in max77693_led_probe() 1024 if (led->iout_joint || max77693_fled_used(led, FLED1)) { in max77693_led_remove() [all …]
|
/openbmc/phosphor-led-sysfs/test/ |
H A D | physical.cpp | 81 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 93 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 105 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 117 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 129 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 140 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 153 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 168 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 181 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() 192 phosphor::led::Physical phy(bus, ledObj, std::move(led)); in TEST() [all …]
|
/openbmc/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_led.c | 92 drm->led = kzalloc(sizeof(*drm->led), GFP_KERNEL); in nouveau_led_init() 97 drm->led->led.name = "nvidia-logo"; in nouveau_led_init() 98 drm->led->led.max_brightness = 255; in nouveau_led_init() 99 drm->led->led.brightness_get = nouveau_led_get_brightness; in nouveau_led_init() 100 drm->led->led.brightness_set = nouveau_led_set_brightness; in nouveau_led_init() 102 ret = led_classdev_register(dev->dev, &drm->led->led); in nouveau_led_init() 117 if (drm->led) in nouveau_led_suspend() 118 led_classdev_suspend(&drm->led->led); in nouveau_led_suspend() 126 if (drm->led) in nouveau_led_resume() 127 led_classdev_resume(&drm->led->led); in nouveau_led_resume() [all …]
|
/openbmc/linux/drivers/net/wireless/broadcom/b43/ |
H A D | leds.c | 53 if (!led->wl) 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() 114 if (led->wl) in b43_register_led() 121 strscpy(led->name, name, sizeof(led->name)); in b43_register_led() 124 led->led_dev.name = led->name; in b43_register_led() 260 b43_led_turn_on(dev, led->index, led->activelow); in b43_leds_init() 264 b43_led_turn_off(dev, led->index, led->activelow); in b43_leds_init() 273 b43_led_turn_off(dev, led->index, led->activelow); in b43_leds_init() 279 b43_led_turn_off(dev, led->index, led->activelow); in b43_leds_init() [all …]
|
/openbmc/linux/drivers/hid/ |
H A D | hid-gt683r.c | 108 mutex_lock(&led->lock); in mode_store() 117 mutex_unlock(&led->lock); in mode_store() 130 hid_err(led->hdev, in gt683r_led_snd_msg() 186 mutex_lock(&led->lock); in gt683r_led_work() 197 mode = led->mode; in gt683r_led_work() 230 struct gt683r_led *led; in gt683r_led_probe() local 232 led = devm_kzalloc(&hdev->dev, sizeof(*led), GFP_KERNEL); in gt683r_led_probe() 233 if (!led) in gt683r_led_probe() 236 mutex_init(&led->lock); in gt683r_led_probe() 240 led->hdev = hdev; in gt683r_led_probe() [all …]
|