|
@@ -1172,6 +1172,12 @@ static struct mfd_cell wm8312_devs[] = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+static struct mfd_cell backlight_devs[] = {
|
|
|
+ {
|
|
|
+ .name = "wm831x-backlight",
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
/*
|
|
|
* Instantiate the generic non-control parts of the device.
|
|
|
*/
|
|
@@ -1325,6 +1331,15 @@ static int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq)
|
|
|
goto err_irq;
|
|
|
}
|
|
|
|
|
|
+ if (pdata && pdata->backlight) {
|
|
|
+ /* Treat errors as non-critical */
|
|
|
+ ret = mfd_add_devices(wm831x->dev, -1, backlight_devs,
|
|
|
+ ARRAY_SIZE(backlight_devs), NULL, 0);
|
|
|
+ if (ret < 0)
|
|
|
+ dev_err(wm831x->dev, "Failed to add backlight: %d\n",
|
|
|
+ ret);
|
|
|
+ }
|
|
|
+
|
|
|
if (pdata && pdata->post_init) {
|
|
|
ret = pdata->post_init(wm831x);
|
|
|
if (ret != 0) {
|