]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ldp: Fix regulator mapping for ads7846 TS controller
authorTony Lindgren <Nayak>
Thu, 24 Feb 2011 12:56:42 +0000 (12:56 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 3 Mar 2011 00:45:50 +0000 (16:45 -0800)
On the OMAP3430LDP board, the ads7846 touchscreen controller
is powered by VAUX1 regulator (supplying 3.0v).
Fix this mapping in the board file, and hence prevent
the ads7846 driver init to fail with the below error..

ads7846 spi1.0: unable to get regulator: -19

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-ldp.c

index a69e59455eed7e2b1c450e0bb59154e3a73e0865..e2ba77957a8c305196a25956633724932cff2d11 100644 (file)
@@ -327,6 +327,26 @@ static struct regulator_init_data ldp_vmmc1 = {
        .consumer_supplies      = &ldp_vmmc1_supply,
 };
 
+/* ads7846 on SPI */
+static struct regulator_consumer_supply ldp_vaux1_supplies[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
+/* VAUX1 */
+static struct regulator_init_data ldp_vaux1 = {
+       .constraints = {
+               .min_uV                 = 3000000,
+               .max_uV                 = 3000000,
+               .apply_uV               = true,
+               .valid_modes_mask       = REGULATOR_MODE_NORMAL
+                                       | REGULATOR_MODE_STANDBY,
+               .valid_ops_mask         = REGULATOR_CHANGE_MODE
+                                       | REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies          = ARRAY_SIZE(ldp_vaux1_supplies),
+       .consumer_supplies              = ldp_vaux1_supplies,
+};
+
 static struct twl4030_platform_data ldp_twldata = {
        .irq_base       = TWL4030_IRQ_BASE,
        .irq_end        = TWL4030_IRQ_END,
@@ -335,6 +355,7 @@ static struct twl4030_platform_data ldp_twldata = {
        .madc           = &ldp_madc_data,
        .usb            = &ldp_usb_data,
        .vmmc1          = &ldp_vmmc1,
+       .vaux1          = &ldp_vaux1,
        .gpio           = &ldp_gpio_data,
        .keypad         = &ldp_kp_twl4030_data,
 };