Use the fine-grained, generic PWM platform driver for backlight.

Update PWM driver to support the notifier from the MTL017 driver
such that when the LVDS is off, the backlight turns off too.
This commit is contained in:
Matt Sealey
2010-09-10 18:29:25 -05:00
parent 86bb4ecfc1
commit 56ef1445b1
3 changed files with 24 additions and 10 deletions

View File

@@ -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
#

View File

@@ -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();

View File

@@ -20,6 +20,23 @@
#include <linux/pwm.h>
#include <linux/pwm_backlight.h>
#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;