Home
last modified time | relevance | path

Searched refs:led_data (Results 1 – 6 of 6) sorted by relevance

/drivers/leds/
Dleds-mlxreg.c61 mlxreg_led_store_hw(struct mlxreg_led_data *led_data, u8 vset) in mlxreg_led_store_hw() argument
63 struct mlxreg_led_priv_data *priv = led_data->data_parent; in mlxreg_led_store_hw()
65 struct mlxreg_core_data *data = led_data->data; in mlxreg_led_store_hw()
99 mlxreg_led_get_hw(struct mlxreg_led_data *led_data) in mlxreg_led_get_hw() argument
101 struct mlxreg_led_priv_data *priv = led_data->data_parent; in mlxreg_led_get_hw()
103 struct mlxreg_core_data *data = led_data->data; in mlxreg_led_get_hw()
119 dev_warn(led_data->led_cdev.dev, "Failed to get current brightness, error: %d\n", in mlxreg_led_get_hw()
128 if (regval >= led_data->base_color && in mlxreg_led_get_hw()
129 regval <= (led_data->base_color + MLXREG_LED_OFFSET_BLINK_6HZ)) in mlxreg_led_get_hw()
138 struct mlxreg_led_data *led_data = cdev_to_priv(cled); in mlxreg_led_brightness_set() local
[all …]
Dleds-pwm.c64 struct led_pwm_data *led_data = &priv->leds[priv->num_leds]; in led_pwm_add() local
68 led_data->active_low = led->active_low; in led_pwm_add()
69 led_data->cdev.name = led->name; in led_pwm_add()
70 led_data->cdev.brightness = LED_OFF; in led_pwm_add()
71 led_data->cdev.max_brightness = led->max_brightness; in led_pwm_add()
72 led_data->cdev.flags = LED_CORE_SUSPENDRESUME; in led_pwm_add()
74 led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in led_pwm_add()
75 if (IS_ERR(led_data->pwm)) in led_pwm_add()
76 return dev_err_probe(dev, PTR_ERR(led_data->pwm), in led_pwm_add()
80 led_data->cdev.brightness_set_blocking = led_pwm_set; in led_pwm_add()
[all …]
Dleds-lt3593.c66 struct lt3593_led_data *led_data; in lt3593_led_probe() local
72 led_data = devm_kzalloc(dev, sizeof(*led_data), GFP_KERNEL); in lt3593_led_probe()
73 if (!led_data) in lt3593_led_probe()
81 led_data->gpiod = devm_gpiod_get(dev, "lltc,ctrl", 0); in lt3593_led_probe()
82 if (IS_ERR(led_data->gpiod)) in lt3593_led_probe()
83 return PTR_ERR(led_data->gpiod); in lt3593_led_probe()
92 led_data->cdev.brightness_set_blocking = lt3593_led_set; in lt3593_led_probe()
93 led_data->cdev.brightness = state ? LED_FULL : LED_OFF; in lt3593_led_probe()
99 ret = devm_led_classdev_register_ext(dev, &led_data->cdev, &init_data); in lt3593_led_probe()
104 platform_set_drvdata(pdev, led_data); in lt3593_led_probe()
Dleds-nic78bx.c124 struct nic78bx_led_data *led_data; in nic78bx_probe() local
128 led_data = devm_kzalloc(dev, sizeof(*led_data), GFP_KERNEL); in nic78bx_probe()
129 if (!led_data) in nic78bx_probe()
132 led_data->pdev = pdev; in nic78bx_probe()
133 platform_set_drvdata(pdev, led_data); in nic78bx_probe()
152 led_data->io_base = io_rc->start; in nic78bx_probe()
153 spin_lock_init(&led_data->lock); in nic78bx_probe()
156 nic78bx_leds[i].data = led_data; in nic78bx_probe()
165 led_data->io_base + NIC78BX_LOCK_REG_OFFSET); in nic78bx_probe()
172 struct nic78bx_led_data *led_data = platform_get_drvdata(pdev); in nic78bx_remove() local
[all …]
Dleds-is31fl32xx.c226 const struct is31fl32xx_led_data *led_data = in is31fl32xx_brightness_set() local
228 const struct is31fl32xx_chipdef *cdef = led_data->priv->cdef; in is31fl32xx_brightness_set()
236 pwm_register_offset = cdef->channels - led_data->channel; in is31fl32xx_brightness_set()
238 pwm_register_offset = led_data->channel - 1; in is31fl32xx_brightness_set()
240 ret = is31fl32xx_write(led_data->priv, in is31fl32xx_brightness_set()
246 return is31fl32xx_write(led_data->priv, cdef->pwm_update_reg, 0); in is31fl32xx_brightness_set()
330 struct is31fl32xx_led_data *led_data) in is31fl32xx_parse_child_dt() argument
332 struct led_classdev *cdev = &led_data->cdev; in is31fl32xx_parse_child_dt()
337 if (ret || reg < 1 || reg > led_data->priv->cdef->channels) { in is31fl32xx_parse_child_dt()
343 led_data->channel = reg; in is31fl32xx_parse_child_dt()
[all …]
Dleds-lm3532.c297 static int lm3532_led_enable(struct lm3532_led *led_data) in lm3532_led_enable() argument
299 int ctrl_en_val = BIT(led_data->control_bank); in lm3532_led_enable()
302 if (led_data->enabled) in lm3532_led_enable()
305 ret = regmap_update_bits(led_data->priv->regmap, LM3532_REG_ENABLE, in lm3532_led_enable()
308 dev_err(led_data->priv->dev, "Failed to set ctrl:%d\n", ret); in lm3532_led_enable()
312 ret = regulator_enable(led_data->priv->regulator); in lm3532_led_enable()
316 led_data->enabled = 1; in lm3532_led_enable()
322 static int lm3532_led_disable(struct lm3532_led *led_data) in lm3532_led_disable() argument
324 int ctrl_en_val = BIT(led_data->control_bank); in lm3532_led_disable()
327 if (!led_data->enabled) in lm3532_led_disable()
[all …]