Commit 48445671 authored by Marek Behún's avatar Marek Behún Committed by Pavel Machek

leds: lm36274: do not set chip settings in DT parsing function

These settings are not parsed from DT and therefore semantically should
not be set in function with a name lm36274_parse_dt.
Signed-off-by: default avatarMarek Behún <marek.behun@nic.cz>
Tested-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 1aeef38c
...@@ -100,14 +100,6 @@ static int lm36274_parse_dt(struct lm36274 *chip, ...@@ -100,14 +100,6 @@ static int lm36274_parse_dt(struct lm36274 *chip,
fwnode_property_read_string(child, "linux,default-trigger", fwnode_property_read_string(child, "linux,default-trigger",
&chip->led_dev.default_trigger); &chip->led_dev.default_trigger);
chip->lmu_data.regmap = chip->regmap;
chip->lmu_data.max_brightness = MAX_BRIGHTNESS_11BIT;
chip->lmu_data.msb_brightness_reg = LM36274_REG_BRT_MSB;
chip->lmu_data.lsb_brightness_reg = LM36274_REG_BRT_LSB;
chip->led_dev.max_brightness = MAX_BRIGHTNESS_11BIT;
chip->led_dev.brightness_set_blocking = lm36274_brightness_set;
return 0; return 0;
err: err:
fwnode_handle_put(child); fwnode_handle_put(child);
...@@ -142,6 +134,14 @@ static int lm36274_probe(struct platform_device *pdev) ...@@ -142,6 +134,14 @@ static int lm36274_probe(struct platform_device *pdev)
return ret; return ret;
} }
chip->lmu_data.regmap = chip->regmap;
chip->lmu_data.max_brightness = MAX_BRIGHTNESS_11BIT;
chip->lmu_data.msb_brightness_reg = LM36274_REG_BRT_MSB;
chip->lmu_data.lsb_brightness_reg = LM36274_REG_BRT_LSB;
chip->led_dev.max_brightness = MAX_BRIGHTNESS_11BIT;
chip->led_dev.brightness_set_blocking = lm36274_brightness_set;
ret = led_classdev_register_ext(chip->dev, &chip->led_dev, &init_data); ret = led_classdev_register_ext(chip->dev, &chip->led_dev, &init_data);
if (ret) if (ret)
dev_err(chip->dev, "Failed to register LED for node %pfw\n", dev_err(chip->dev, "Failed to register LED for node %pfw\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment