+ * Copyright 2016-2019 pSemi, Inc.
+ * Author : Brian Dodge <bdodge@xxxxxxxxx>
*/
#include <linux/backlight.h>
@@ -191,27 +191,46 @@ static void arcxcnn_parse_dt(struct arcxcnn *lp)
if (ret == 0)
lp->pdata->initial_brightness = prog_val;
- ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
+ ret = of_property_read_u32(node, "arctic,led-config-0", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node, "arc,led-config-0", &prog_val);
+
if (ret == 0)
lp->pdata->led_config_0 = (u8)prog_val;
- ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
+ ret = of_property_read_u32(node, "arctic,led-config-1", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node, "arc,led-config-1", &prog_val);
+
if (ret == 0)
lp->pdata->led_config_1 = (u8)prog_val;
- ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
+ ret = of_property_read_u32(node, "arctic,dim-freq", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node, "arc,dim-freq", &prog_val);
+
if (ret == 0)
lp->pdata->dim_freq = (u8)prog_val;
- ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
+ ret = of_property_read_u32(node, "arctic,comp-config", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node, "arc,comp-config", &prog_val);
+
if (ret == 0)
lp->pdata->comp_config = (u8)prog_val;
- ret = of_property_read_u32(node, "arc,filter-config", &prog_val);
+ ret = of_property_read_u32(node, "arctic,filter-config", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node,
+ "arc,filter-config", &prog_val);
+
if (ret == 0)
lp->pdata->filter_config = (u8)prog_val;
- ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
+ ret = of_property_read_u32(node, "arctic,trim-config", &prog_val);
+ if (ret)
+ ret = of_property_read_u32(node, "arc,trim-config", &prog_val);
+
if (ret == 0)
lp->pdata->trim_config = (u8)prog_val;
@@ -381,6 +400,8 @@ static int arcxcnn_remove(struct i2c_client *cl)
}
static const struct of_device_id arcxcnn_dt_ids[] = {
+ { .compatible = "arctic,arc2c0608" },
+ /* here to remain compatible with an older binding, do not use */
{ .compatible = "arc,arc2c0608" },
{ }
};
@@ -404,5 +425,5 @@ static struct i2c_driver arcxcnn_driver = {
module_i2c_driver(arcxcnn_driver);
MODULE_LICENSE("GPL v2");
-MODULE_AUTHOR("Brian Dodge <bdodge@xxxxxxxxxxxxxx>");
+MODULE_AUTHOR("Brian Dodge <bdodge@xxxxxxxxx>");
MODULE_DESCRIPTION("ARCXCNN Backlight driver");