diff options
-rw-r--r-- | arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c | 6 | ||||
-rw-r--r-- | drivers/video/backlight/wm8350_bl.c | 2 | ||||
-rw-r--r-- | include/linux/regulator/wm8350/wm8350-pmic.h | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c b/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c index edc2f7bbdef0..ce5ed6dbadc6 100644 --- a/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c +++ b/arch/arm/mach-mx37/mx37_3stack_pmic_wm8350.c @@ -232,6 +232,11 @@ static void wm8350_nop_release(struct device *dev) /* Nothing */ } +static int wm8350_check_fb(struct fb_info *info) +{ + return (to_platform_device(info->device)->id == 0); +} + struct wm8350_bl_platform_data wm8350_bl_data = { .isink = WM8350_ISINK_A, .dcdc = WM8350_DCDC_5, @@ -240,6 +245,7 @@ struct wm8350_bl_platform_data wm8350_bl_data = { .max_brightness = 63, .power = FB_BLANK_UNBLANK, .brightness = 50, + .check_fb = wm8350_check_fb, }; static struct platform_device mxc_wm8350_devices[] = { diff --git a/drivers/video/backlight/wm8350_bl.c b/drivers/video/backlight/wm8350_bl.c index 152aea7f9f24..1271518b447e 100644 --- a/drivers/video/backlight/wm8350_bl.c +++ b/drivers/video/backlight/wm8350_bl.c @@ -206,6 +206,8 @@ static int wm8350_bl_probe(struct platform_device *pdev) platform_set_drvdata(pdev, bl); pmic = regulator_get_drvdata(bl->isink); + wm8350_bl_ops.check_fb = pdata->check_fb; + bl->device = backlight_device_register(pdev->dev.bus_id, &pdev->dev, bl, &wm8350_bl_ops); if (IS_ERR(bl->device)) { diff --git a/include/linux/regulator/wm8350/wm8350-pmic.h b/include/linux/regulator/wm8350/wm8350-pmic.h index 7054c75b46bb..bc78d3afb245 100644 --- a/include/linux/regulator/wm8350/wm8350-pmic.h +++ b/include/linux/regulator/wm8350/wm8350-pmic.h @@ -786,6 +786,8 @@ struct wm8350_led_platform_data { int full_value; }; +struct fb_info; + /* * WM8350 Backlight platform data */ @@ -797,6 +799,7 @@ struct wm8350_bl_platform_data { int max_brightness; int power; int brightness; + int (*check_fb)(struct fb_info *); }; #endif |