aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-zoom-peripherals.c
diff options
context:
space:
mode:
authorKishore Y <kishore.y@ti.com>2010-11-15 01:09:03 -0500
committerTomi Valkeinen <tomi.valkeinen@nokia.com>2011-01-10 03:54:20 -0500
commita64903357596c64f3848d448033eb5cc7563c00d (patch)
tree9ca86cb91c541dcf6733115c9360f311fc8bde85 /arch/arm/mach-omap2/board-zoom-peripherals.c
parent2d2afa46e320b22d1ddcd430d62d6363b0a7e2b9 (diff)
OMAP3: ZOOM2/3/3630SDP: Add display board file for OMAP3
Board-zoom-display.c added as a common file for display functionality on boards zoom2, zoom3 and 3630sdp. Signed-off-by: Mukund Mittal <mmittal@ti.com> Signed-off-by: Kishore Y <kishore.y@ti.com> Signed-off-by: Rajkumar N <rajkumar.nagarajan@ti.com> Signed-off-by: Samreen <samreen@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c49
1 files changed, 47 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 3fbd0edd712e..14d95afa3f0d 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -35,6 +35,8 @@
35#define OMAP_ZOOM_WLAN_PMENA_GPIO (101) 35#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
36#define OMAP_ZOOM_WLAN_IRQ_GPIO (162) 36#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
37 37
38#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
39
38/* Zoom2 has Qwerty keyboard*/ 40/* Zoom2 has Qwerty keyboard*/
39static uint32_t board_keymap[] = { 41static uint32_t board_keymap[] = {
40 KEY(0, 0, KEY_E), 42 KEY(0, 0, KEY_E),
@@ -224,9 +226,43 @@ static struct omap2_hsmmc_info mmc[] = {
224 {} /* Terminator */ 226 {} /* Terminator */
225}; 227};
226 228
229static struct regulator_consumer_supply zoom_vpll2_supply =
230 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
231
232static struct regulator_consumer_supply zoom_vdda_dac_supply =
233 REGULATOR_SUPPLY("vdda_dac", "omapdss");
234
235static struct regulator_init_data zoom_vpll2 = {
236 .constraints = {
237 .min_uV = 1800000,
238 .max_uV = 1800000,
239 .valid_modes_mask = REGULATOR_MODE_NORMAL
240 | REGULATOR_MODE_STANDBY,
241 .valid_ops_mask = REGULATOR_CHANGE_MODE
242 | REGULATOR_CHANGE_STATUS,
243 },
244 .num_consumer_supplies = 1,
245 .consumer_supplies = &zoom_vpll2_supply,
246};
247
248static struct regulator_init_data zoom_vdac = {
249 .constraints = {
250 .min_uV = 1800000,
251 .max_uV = 1800000,
252 .valid_modes_mask = REGULATOR_MODE_NORMAL
253 | REGULATOR_MODE_STANDBY,
254 .valid_ops_mask = REGULATOR_CHANGE_MODE
255 | REGULATOR_CHANGE_STATUS,
256 },
257 .num_consumer_supplies = 1,
258 .consumer_supplies = &zoom_vdda_dac_supply,
259};
260
227static int zoom_twl_gpio_setup(struct device *dev, 261static int zoom_twl_gpio_setup(struct device *dev,
228 unsigned gpio, unsigned ngpio) 262 unsigned gpio, unsigned ngpio)
229{ 263{
264 int ret;
265
230 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 266 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
231 mmc[0].gpio_cd = gpio + 0; 267 mmc[0].gpio_cd = gpio + 0;
232 omap2_hsmmc_init(mmc); 268 omap2_hsmmc_init(mmc);
@@ -238,7 +274,15 @@ static int zoom_twl_gpio_setup(struct device *dev,
238 zoom_vsim_supply.dev = mmc[0].dev; 274 zoom_vsim_supply.dev = mmc[0].dev;
239 zoom_vmmc2_supply.dev = mmc[1].dev; 275 zoom_vmmc2_supply.dev = mmc[1].dev;
240 276
241 return 0; 277 ret = gpio_request(LCD_PANEL_ENABLE_GPIO, "lcd enable");
278 if (ret) {
279 pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n",
280 LCD_PANEL_ENABLE_GPIO);
281 return ret;
282 }
283 gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
284
285 return ret;
242} 286}
243 287
244/* EXTMUTE callback function */ 288/* EXTMUTE callback function */
@@ -301,7 +345,8 @@ static struct twl4030_platform_data zoom_twldata = {
301 .vmmc1 = &zoom_vmmc1, 345 .vmmc1 = &zoom_vmmc1,
302 .vmmc2 = &zoom_vmmc2, 346 .vmmc2 = &zoom_vmmc2,
303 .vsim = &zoom_vsim, 347 .vsim = &zoom_vsim,
304 348 .vpll2 = &zoom_vpll2,
349 .vdac = &zoom_vdac,
305}; 350};
306 351
307static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = { 352static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {