From patchwork Tue Aug 2 11:28:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 1029242 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p72BT6NY019914 for ; Tue, 2 Aug 2011 11:29:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753964Ab1HBL3M (ORCPT ); Tue, 2 Aug 2011 07:29:12 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:53095 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955Ab1HBL3L (ORCPT ); Tue, 2 Aug 2011 07:29:11 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id p72BT6fq009589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Aug 2011 06:29:07 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep34.itg.ti.com (8.13.7/8.13.8) with ESMTP id p72BT6hD028846; Tue, 2 Aug 2011 06:29:06 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p72BT6MW024754; Tue, 2 Aug 2011 06:29:06 -0500 (CDT) Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Tue, 2 Aug 2011 06:29:06 -0500 Received: from barack.norway.design.ti.com (h88-3.vpn.ti.com [172.24.88.3]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id p72BSl3H010921; Tue, 2 Aug 2011 06:29:03 -0500 From: Peter Ujfalusi To: Liam Girdwood , Tony Lindgren , Mark Brown CC: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org, Misael Lopez Cruz , Benoit Cousson , Sebastien Guiriec Subject: [PATCH 4/4] OMAP4: SDP4430: Add vibrator platform data Date: Tue, 2 Aug 2011 14:28:46 +0300 Message-ID: <1312284526-1656-6-git-send-email-peter.ujfalusi@ti.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312284526-1656-1-git-send-email-peter.ujfalusi@ti.com> References: <1312284526-1656-1-git-send-email-peter.ujfalusi@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 02 Aug 2011 11:29:26 +0000 (UTC) From: Misael Lopez Cruz Blaze/SDP4430 contains two 10-Ohms vibrator motors, both supplied by VBAT_PROC (3.75V). Signed-off-by: Misael Lopez Cruz --- arch/arm/mach-omap2/board-4430sdp.c | 37 ++++++++++++++++++++++++++++++++++- 1 files changed, 36 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 95396ce..1060d48 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -311,11 +312,40 @@ static struct platform_device sdp4430_lcd_device = { .id = -1, }; +static struct regulator_consumer_supply sdp4430_vbat_supply[] = { + REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"), + REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"), +}; + +static struct regulator_init_data sdp4430_vbat_data = { + .constraints = { + .always_on = 1, + }, + .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply), + .consumer_supplies = sdp4430_vbat_supply, +}; + +static struct fixed_voltage_config sdp4430_vbat_pdata = { + .supply_name = "VBAT", + .microvolts = 3750000, + .init_data = &sdp4430_vbat_data, + .gpio = -EINVAL, +}; + +static struct platform_device sdp4430_vbat = { + .name = "reg-fixed-voltage", + .id = -1, + .dev = { + .platform_data = &sdp4430_vbat_pdata, + }, +}; + static struct platform_device *sdp4430_devices[] __initdata = { &sdp4430_lcd_device, &sdp4430_gpio_keys_device, &sdp4430_leds_gpio, &sdp4430_leds_pwm, + &sdp4430_vbat, }; static struct omap_lcd_config sdp4430_lcd_config __initdata = { @@ -572,7 +602,12 @@ static struct twl4030_codec_audio_data twl6040_audio = { }; static struct twl4030_codec_vibra_data twl6040_vibra = { - /* Add vibra only data */ + .vibldrv_res = 8, + .vibrdrv_res = 3, + .viblmotor_res = 10, + .vibrmotor_res = 10, + .vddvibl_uV = 0, /* fixed volt supply - VBAT */ + .vddvibr_uV = 0, /* fixed volt supply - VBAT */ }; static struct twl4030_codec_data twl6040_codec = {