@@ -19,6 +19,8 @@
#include <linux/reboot.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
#include <linux/pwm_backlight.h>
#include <linux/gpio.h>
#include <linux/gpio_keys.h>
@@ -49,6 +51,10 @@ static struct resource puv3_i2c_resources[] = {
}
};
+/* Dummy regulator for pwm-backlight driver */
+static struct regulator_consumer_supply backlight_supply =
+ REGULATOR_SUPPLY("power", "pwm-backlight");
+
static struct platform_pwm_backlight_data nb0916_backlight_data = {
.pwm_id = 0,
.max_brightness = 100,
@@ -111,6 +117,9 @@ int __init mach_nb0916_init(void)
platform_device_register_simple("PKUnity-v3-I2C", -1,
puv3_i2c_resources, ARRAY_SIZE(puv3_i2c_resources));
+ regulator_register_always_on(-1, "backlight-power",
+ &backlight_supply, 1, 0);
+
platform_device_register_data(&platform_bus, "pwm-backlight", -1,
&nb0916_backlight_data, sizeof(nb0916_backlight_data));