diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-display.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-display.c | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c index 8cef477d6b00..9a7174faac51 100644 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ b/arch/arm/mach-omap2/board-zoom-display.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | #include <linux/i2c/twl.h> | ||
16 | #include <linux/spi/spi.h> | 15 | #include <linux/spi/spi.h> |
17 | #include <linux/platform_data/spi-omap2-mcspi.h> | 16 | #include <linux/platform_data/spi-omap2-mcspi.h> |
18 | #include <video/omapdss.h> | 17 | #include <video/omapdss.h> |
@@ -49,59 +48,6 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev) | |||
49 | { | 48 | { |
50 | } | 49 | } |
51 | 50 | ||
52 | /* Register offsets in TWL4030_MODULE_INTBR */ | ||
53 | #define TWL_INTBR_PMBR1 0xD | ||
54 | #define TWL_INTBR_GPBR1 0xC | ||
55 | |||
56 | /* Register offsets in TWL_MODULE_PWM */ | ||
57 | #define TWL_LED_PWMON 0x3 | ||
58 | #define TWL_LED_PWMOFF 0x4 | ||
59 | |||
60 | static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level) | ||
61 | { | ||
62 | #ifdef CONFIG_TWL4030_CORE | ||
63 | unsigned char c; | ||
64 | u8 mux_pwm, enb_pwm; | ||
65 | |||
66 | if (level > 100) | ||
67 | return -1; | ||
68 | |||
69 | twl_i2c_read_u8(TWL4030_MODULE_INTBR, &mux_pwm, TWL_INTBR_PMBR1); | ||
70 | twl_i2c_read_u8(TWL4030_MODULE_INTBR, &enb_pwm, TWL_INTBR_GPBR1); | ||
71 | |||
72 | if (level == 0) { | ||
73 | /* disable pwm1 output and clock */ | ||
74 | enb_pwm = enb_pwm & 0xF5; | ||
75 | /* change pwm1 pin to gpio pin */ | ||
76 | mux_pwm = mux_pwm & 0xCF; | ||
77 | twl_i2c_write_u8(TWL4030_MODULE_INTBR, | ||
78 | enb_pwm, TWL_INTBR_GPBR1); | ||
79 | twl_i2c_write_u8(TWL4030_MODULE_INTBR, | ||
80 | mux_pwm, TWL_INTBR_PMBR1); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | if (!((enb_pwm & 0xA) && (mux_pwm & 0x30))) { | ||
85 | /* change gpio pin to pwm1 pin */ | ||
86 | mux_pwm = mux_pwm | 0x30; | ||
87 | /* enable pwm1 output and clock*/ | ||
88 | enb_pwm = enb_pwm | 0x0A; | ||
89 | twl_i2c_write_u8(TWL4030_MODULE_INTBR, | ||
90 | mux_pwm, TWL_INTBR_PMBR1); | ||
91 | twl_i2c_write_u8(TWL4030_MODULE_INTBR, | ||
92 | enb_pwm, TWL_INTBR_GPBR1); | ||
93 | } | ||
94 | |||
95 | c = ((50 * (100 - level)) / 100) + 1; | ||
96 | twl_i2c_write_u8(TWL_MODULE_PWM, 0x7F, TWL_LED_PWMOFF); | ||
97 | twl_i2c_write_u8(TWL_MODULE_PWM, c, TWL_LED_PWMON); | ||
98 | #else | ||
99 | pr_warn("Backlight not enabled\n"); | ||
100 | #endif | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | static struct omap_dss_device zoom_lcd_device = { | 51 | static struct omap_dss_device zoom_lcd_device = { |
106 | .name = "lcd", | 52 | .name = "lcd", |
107 | .driver_name = "NEC_8048_panel", | 53 | .driver_name = "NEC_8048_panel", |
@@ -109,8 +55,6 @@ static struct omap_dss_device zoom_lcd_device = { | |||
109 | .phy.dpi.data_lines = 24, | 55 | .phy.dpi.data_lines = 24, |
110 | .platform_enable = zoom_panel_enable_lcd, | 56 | .platform_enable = zoom_panel_enable_lcd, |
111 | .platform_disable = zoom_panel_disable_lcd, | 57 | .platform_disable = zoom_panel_disable_lcd, |
112 | .max_backlight_level = 100, | ||
113 | .set_backlight = zoom_set_bl_intensity, | ||
114 | }; | 58 | }; |
115 | 59 | ||
116 | static struct omap_dss_device *zoom_dss_devices[] = { | 60 | static struct omap_dss_device *zoom_dss_devices[] = { |