Lines Matching refs:led_data
298 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()
331 ret = regmap_update_bits(led_data->priv->regmap, LM3532_REG_ENABLE, in lm3532_led_disable()
334 dev_err(led_data->priv->dev, "Failed to set ctrl:%d\n", ret); in lm3532_led_disable()
338 ret = regulator_disable(led_data->priv->regulator); in lm3532_led_disable()
342 led_data->enabled = 0; in lm3532_led_disable()