/linux-6.3-rc2/drivers/leds/ |
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 …]
|
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 …]
|
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 …]
|
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 …]
|
A D | leds-lp8860.c | 144 mutex_lock(&led->lock); in lp8860_unlock_eeprom() 213 mutex_lock(&led->lock); in lp8860_brightness_set() 244 if (led->regulator) { in lp8860_init() 253 if (led->enable_gpio) in lp8860_init() 297 if (led->enable_gpio) in lp8860_init() 300 if (led->regulator) { in lp8860_init() 386 led = devm_kzalloc(&client->dev, sizeof(*led), GFP_KERNEL); in lp8860_probe() 387 if (!led) in lp8860_probe() 406 led->client = client; in lp8860_probe() 452 if (led->enable_gpio) in lp8860_remove() [all …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 …]
|
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 96 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in spi_byte_probe() 97 if (!led) in spi_byte_probe() 101 strlcpy(led->name, name, sizeof(led->name)); in spi_byte_probe() 102 led->spi = spi; in spi_byte_probe() 103 mutex_init(&led->mutex); in spi_byte_probe() 105 led->ldev.name = led->name; in spi_byte_probe() 107 led->ldev.max_brightness = led->cdef->max_value - led->cdef->off_value; in spi_byte_probe() [all …]
|
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 …]
|
A D | leds-pm8058.c | 31 struct pm8058_led *led; in pm8058_led_set() local 37 switch (led->ledtype) { in pm8058_led_set() 51 ret = regmap_update_bits(led->map, led->reg, mask, val); in pm8058_led_set() 58 struct pm8058_led *led; in pm8058_led_get() local 64 ret = regmap_read(led->map, led->reg, &val); in pm8058_led_get() 70 switch (led->ledtype) { in pm8058_led_get() 92 struct pm8058_led *led; in pm8058_led_probe() local 99 led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL); in pm8058_led_probe() 100 if (!led) in pm8058_led_probe() 110 led->map = map; in pm8058_led_probe() [all …]
|
A D | leds-pca963x.c | 133 if (led->blinking) { in pca963x_brightness() 137 led->led_num, in pca963x_brightness() 152 led->led_num, in pca963x_brightness() 157 if (led->blinking) in pca963x_brightness() 198 led->blinking = true; in pca963x_blink() 289 led->gdc = gdc; in pca963x_blink_set() 290 led->gfrq = gfrq; in pca963x_blink_set() 292 pca963x_blink(led); in pca963x_blink_set() 352 led->led_num = reg; in pca963x_register_leds() 353 led->chip = chip; in pca963x_register_leds() [all …]
|
A D | leds-an30259a.c | 80 struct an30259a_led *led; in an30259a_brightness_set() local 95 led->sloping = false; in an30259a_brightness_set() 99 if (led->sloping) in an30259a_brightness_set() 114 ret = regmap_write(led->chip->regmap, AN30259A_REG_LEDCC(led->num), in an30259a_brightness_set() 134 num = led->num; in an30259a_blink_set() 191 led->sloping = true; in an30259a_blink_set() 221 led = &chip->leds[i]; in an30259a_dt_init() 223 led->num = source; in an30259a_dt_init() 224 led->chip = chip; in an30259a_dt_init() 226 led->default_state = led_init_default_state_get(led->fwnode); in an30259a_dt_init() [all …]
|
/linux-6.3-rc2/drivers/leds/flash/ |
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 …]
|
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 …]
|
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 …]
|
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 …]
|
/linux-6.3-rc2/drivers/gpu/drm/nouveau/ |
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 …]
|
/linux-6.3-rc2/drivers/net/wireless/broadcom/b43/ |
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 …]
|
/linux-6.3-rc2/drivers/hid/ |
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 …]
|
A D | hid-picolcd_leds.c | 37 if (!data->led[0]) in picolcd_leds_set() 114 if (!led) { in picolcd_init_leds() 121 led->name = name; in picolcd_init_leds() 127 data->led[i] = led; in picolcd_init_leds() 131 kfree(led); in picolcd_init_leds() 139 if (data->led[i]) { in picolcd_init_leds() 140 led = data->led[i]; in picolcd_init_leds() 143 kfree(led); in picolcd_init_leds() 154 led = data->led[i]; in picolcd_exit_leds() 156 if (!led) in picolcd_exit_leds() [all …]
|