diff --git a/arch/arm/configs/mx51_efikasb_defconfig b/arch/arm/configs/mx51_efikasb_defconfig index 14f2afe689f..9d5e0a25352 100644 --- a/arch/arm/configs/mx51_efikasb_defconfig +++ b/arch/arm/configs/mx51_efikasb_defconfig @@ -1,9 +1,10 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.31.14 -# Fri Sep 10 11:05:25 2010 +# Fri Sep 10 18:26:57 2010 # CONFIG_ARM=y +CONFIG_HAVE_PWM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y CONFIG_GENERIC_GPIO=y CONFIG_GENERIC_TIME=y @@ -220,7 +221,7 @@ CONFIG_MACH_MX51_EFIKASB=y CONFIG_MXC_TZIC=y CONFIG_ISP1504_MXC=y # CONFIG_MXC_IRQ_PRIOR is not set -# CONFIG_MXC_PWM is not set +CONFIG_MXC_PWM=y CONFIG_MXC_DVFS_PER=y # @@ -1239,8 +1240,8 @@ CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y # CONFIG_BACKLIGHT_GENERIC is not set -CONFIG_BACKLIGHT_MXC=y -CONFIG_BACKLIGHT_MXC_EFIKASB=y +CONFIG_BACKLIGHT_PWM=y +# CONFIG_BACKLIGHT_MXC is not set # # Display device support @@ -1564,6 +1565,7 @@ CONFIG_LEDS_GPIO_PLATFORM=y # CONFIG_LEDS_LP3944 is not set # CONFIG_LEDS_PCA955X is not set # CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set # CONFIG_LEDS_BD2802 is not set # diff --git a/arch/arm/mach-mx5/mx51_efikasb.c b/arch/arm/mach-mx5/mx51_efikasb.c index 9580eaea9ce..0d5f5e801c5 100644 --- a/arch/arm/mach-mx5/mx51_efikasb.c +++ b/arch/arm/mach-mx5/mx51_efikasb.c @@ -354,10 +354,6 @@ static struct mxc_lcd_platform_data lvds_data = { .lvds_enable = mxc_lvds_enable, }; -static struct platform_device mxcbl_device = { - .name = "mxc_efikasb_bl", -}; - static struct platform_device mxc_led_device = { .name = "efikasb_leds", .id = 1, @@ -748,7 +744,6 @@ static void __init mxc_board_init(void) mxc_register_device(&mxc_dvfs_per_device, &dvfs_per_data); mxc_register_device(&mxc_iim_device, NULL); mxc_register_device(&mxc_pwm1_device, NULL); - mxc_register_device(&mxc_pwm_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxc_ssi1_device, NULL); mxc_register_device(&mxc_ssi2_device, NULL); @@ -756,7 +751,7 @@ static void __init mxc_board_init(void) mxc_register_device(&mxc_alsa_spdif_device, &mxc_spdif_data); mxc_init_fb(); - mxc_register_device(&mxcbl_device, NULL); + mxc_register_device(&mxc_pwm_backlight_device, &mxc_pwm_backlight_data); mxc_register_device(&mxc_led_device, NULL); mx51_efikasb_init_mc13892(); diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 29024e83b36..4491450d7ce 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -20,6 +20,23 @@ #include #include + +#if defined(CONFIG_FB_MXC_MTL017) +static BLOCKING_NOTIFIER_HEAD(backlight_notifier_list); + +int register_backlight_notifier(struct notifier_block *nb) +{ + return blocking_notifier_chain_register(&backlight_notifier_list, nb); +} +EXPORT_SYMBOL_GPL(register_backlight_notifier); + +int unregister_backlight_notifier(struct notifier_block *nb) +{ + return blocking_notifier_chain_unregister(&backlight_notifier_list, nb); +} +EXPORT_SYMBOL_GPL(unregister_backlight_notifier); +#endif + struct pwm_bl_data { struct pwm_device *pwm; unsigned int period;