Lines Matching defs:led_data
59 mlxreg_led_store_hw(struct mlxreg_led_data *led_data, u8 vset)
61 struct mlxreg_led_priv_data *priv = led_data->data_parent;
63 struct mlxreg_core_data *data = led_data->data;
97 mlxreg_led_get_hw(struct mlxreg_led_data *led_data)
99 struct mlxreg_led_priv_data *priv = led_data->data_parent;
101 struct mlxreg_core_data *data = led_data->data;
117 dev_warn(led_data->led_cdev.dev, "Failed to get current brightness, error: %d\n",
126 if (regval >= led_data->base_color &&
127 regval <= (led_data->base_color + MLXREG_LED_OFFSET_BLINK_6HZ))
136 struct mlxreg_led_data *led_data = cdev_to_priv(cled);
139 return mlxreg_led_store_hw(led_data, led_data->base_color);
141 return mlxreg_led_store_hw(led_data, MLXREG_LED_IS_OFF);
147 struct mlxreg_led_data *led_data = cdev_to_priv(cled);
149 return mlxreg_led_get_hw(led_data);
156 struct mlxreg_led_data *led_data = cdev_to_priv(cled);
172 err = mlxreg_led_store_hw(led_data, led_data->base_color +
175 err = mlxreg_led_store_hw(led_data, led_data->base_color +
178 err = mlxreg_led_store_hw(led_data, led_data->base_color);
187 struct mlxreg_led_data *led_data;
195 led_data = devm_kzalloc(&priv->pdev->dev, sizeof(*led_data),
197 if (!led_data)
217 led_cdev = &led_data->led_cdev;
218 led_data->data_parent = priv;
222 led_data->base_color = MLXREG_LED_RED_SOLID;
225 led_data->base_color = MLXREG_LED_AMBER_SOLID;
228 led_data->base_color = MLXREG_LED_GREEN_SOLID;
230 snprintf(led_data->led_cdev_name, sizeof(led_data->led_cdev_name),
232 led_cdev->name = led_data->led_cdev_name;
240 led_data->data = data;