Home
last modified time | relevance | path

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

/Linux-v5.4/drivers/leds/
Dleds-mlxreg.c60 mlxreg_led_store_hw(struct mlxreg_led_data *led_data, u8 vset) in mlxreg_led_store_hw() argument
62 struct mlxreg_led_priv_data *priv = led_data->data_parent; in mlxreg_led_store_hw()
64 struct mlxreg_core_data *data = led_data->data; in mlxreg_led_store_hw()
98 mlxreg_led_get_hw(struct mlxreg_led_data *led_data) in mlxreg_led_get_hw() argument
100 struct mlxreg_led_priv_data *priv = led_data->data_parent; in mlxreg_led_get_hw()
102 struct mlxreg_core_data *data = led_data->data; in mlxreg_led_get_hw()
118 dev_warn(led_data->led_cdev.dev, "Failed to get current brightness, error: %d\n", in mlxreg_led_get_hw()
127 if (regval >= led_data->base_color && in mlxreg_led_get_hw()
128 regval <= (led_data->base_color + MLXREG_LED_OFFSET_BLINK_6HZ)) in mlxreg_led_get_hw()
137 struct mlxreg_led_data *led_data = cdev_to_priv(cled); in mlxreg_led_brightness_set() local
[all …]
Dleds-pwm.c71 struct led_pwm_data *led_data = &priv->leds[priv->num_leds]; in led_pwm_add() local
75 led_data->active_low = led->active_low; in led_pwm_add()
76 led_data->cdev.name = led->name; in led_pwm_add()
77 led_data->cdev.default_trigger = led->default_trigger; in led_pwm_add()
78 led_data->cdev.brightness = LED_OFF; in led_pwm_add()
79 led_data->cdev.max_brightness = led->max_brightness; in led_pwm_add()
80 led_data->cdev.flags = LED_CORE_SUSPENDRESUME; in led_pwm_add()
83 led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in led_pwm_add()
85 led_data->pwm = devm_pwm_get(dev, led->name); in led_pwm_add()
86 if (IS_ERR(led_data->pwm)) { in led_pwm_add()
[all …]
Dleds-lt3593.c66 struct lt3593_led_data *led_data; in lt3593_led_probe() local
75 led_data = devm_kzalloc(dev, sizeof(*led_data), GFP_KERNEL); in lt3593_led_probe()
76 if (!led_data) in lt3593_led_probe()
84 led_data->gpiod = devm_gpiod_get(dev, "lltc,ctrl", 0); in lt3593_led_probe()
85 if (IS_ERR(led_data->gpiod)) in lt3593_led_probe()
86 return PTR_ERR(led_data->gpiod); in lt3593_led_probe()
91 &led_data->cdev.default_trigger); in lt3593_led_probe()
98 led_data->cdev.brightness_set_blocking = lt3593_led_set; in lt3593_led_probe()
99 led_data->cdev.brightness = state ? LED_FULL : LED_OFF; in lt3593_led_probe()
105 ret = devm_led_classdev_register_ext(dev, &led_data->cdev, &init_data); in lt3593_led_probe()
[all …]
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.c225 const struct is31fl32xx_led_data *led_data = in is31fl32xx_brightness_set() local
227 const struct is31fl32xx_chipdef *cdef = led_data->priv->cdef; in is31fl32xx_brightness_set()
235 pwm_register_offset = cdef->channels - led_data->channel; in is31fl32xx_brightness_set()
237 pwm_register_offset = led_data->channel - 1; in is31fl32xx_brightness_set()
239 ret = is31fl32xx_write(led_data->priv, in is31fl32xx_brightness_set()
245 return is31fl32xx_write(led_data->priv, cdef->pwm_update_reg, 0); in is31fl32xx_brightness_set()
329 struct is31fl32xx_led_data *led_data) in is31fl32xx_parse_child_dt() argument
331 struct led_classdev *cdev = &led_data->cdev; in is31fl32xx_parse_child_dt()
339 if (ret || reg < 1 || reg > led_data->priv->cdef->channels) { in is31fl32xx_parse_child_dt()
345 led_data->channel = reg; in is31fl32xx_parse_child_dt()
[all …]
Dleds-lm3532.c298 static int lm3532_led_enable(struct lm3532_led *led_data) in lm3532_led_enable() argument
300 int ctrl_en_val = BIT(led_data->control_bank); in lm3532_led_enable()
303 if (led_data->enabled) in lm3532_led_enable()
306 ret = regmap_update_bits(led_data->priv->regmap, LM3532_REG_ENABLE, in lm3532_led_enable()
309 dev_err(led_data->priv->dev, "Failed to set ctrl:%d\n", ret); in lm3532_led_enable()
313 ret = regulator_enable(led_data->priv->regulator); in lm3532_led_enable()
317 led_data->enabled = 1; in lm3532_led_enable()
323 static int lm3532_led_disable(struct lm3532_led *led_data) in lm3532_led_disable() argument
325 int ctrl_en_val = BIT(led_data->control_bank); in lm3532_led_disable()
328 if (!led_data->enabled) in lm3532_led_disable()
[all …]
/Linux-v5.4/include/linux/mfd/
Dmax77693.h76 struct max77693_led_platform_data *led_data; member