OSDN Git Service

omap3sdp: Fix regulator mapping for ads7846 TS controller
authorRajendra Nayak <rnayak@ti.com>
Thu, 3 Feb 2011 12:45:21 +0000 (12:45 +0000)
committerTony Lindgren <tony@atomide.com>
Thu, 17 Feb 2011 23:43:10 +0000 (15:43 -0800)
On the OMAP3430SDP board, the ads7846 touchscreen controller
is powered by VAUX3 regulator (supplying 2.8v).
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>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-3430sdp.c

index 3108588..7f8c7a7 100644 (file)
@@ -426,6 +426,11 @@ static struct twl4030_madc_platform_data sdp3430_madc_data = {
        .irq_line       = 1,
 };
 
+/* ads7846 on SPI */
+static struct regulator_consumer_supply sdp3430_vaux3_supplies[] = {
+       REGULATOR_SUPPLY("vcc", "spi1.0"),
+};
+
 /*
  * Apply all the fixed voltages since most versions of U-Boot
  * don't bother with that initialization.
@@ -468,6 +473,8 @@ static struct regulator_init_data sdp3430_vaux3 = {
                .valid_ops_mask         = REGULATOR_CHANGE_MODE
                                        | REGULATOR_CHANGE_STATUS,
        },
+       .num_consumer_supplies          = ARRAY_SIZE(sdp3430_vaux3_supplies),
+       .consumer_supplies              = sdp3430_vaux3_supplies,
 };
 
 /* VAUX4 for OMAP VDD_CSI2 (camera) */