All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Liam Girdwood <lrg@ti.com>, Tony Lindgren <tony@atomide.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-omap@vger.kernel.org, alsa-devel@alsa-project.org,
	Misael Lopez Cruz <misael.lopez@ti.com>,
	Benoit Cousson <b-cousson@ti.com>,
	Sebastien Guiriec <s-guiriec@ti.com>
Subject: [PATCH 4/4] OMAP4: SDP4430: Add vibrator platform data
Date: Tue, 2 Aug 2011 14:28:46 +0300	[thread overview]
Message-ID: <1312284526-1656-6-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1312284526-1656-1-git-send-email-peter.ujfalusi@ti.com>

From: Misael Lopez Cruz <misael.lopez@ti.com>

Blaze/SDP4430 contains two 10-Ohms vibrator motors, both supplied
by VBAT_PROC (3.75V).

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
---
 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 <linux/i2c/twl.h>
 #include <linux/gpio_keys.h>
 #include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
 #include <linux/leds.h>
 #include <linux/leds_pwm.h>
 
@@ -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 = {
-- 
1.7.5.rc3


  parent reply	other threads:[~2011-08-02 11:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 11:28 [PATCH 1/3] mfd: twl6040: Add initial support Peter Ujfalusi
2011-08-02 11:28 ` [PATCH 2/4] Fixes for "input: Add initial support for TWL6040 vibrator" Peter Ujfalusi
2011-08-02 12:33   ` Felipe Balbi
2011-08-02 12:37     ` Péter Ujfalusi
2011-08-02 11:28 ` [PATCH 2/3] input: Add initial support for TWL6040 vibrator Peter Ujfalusi
2011-08-02 11:28 ` [PATCH 3/3] ASoC: twl6040: Convert into TWL6040 MFD child Peter Ujfalusi
2011-08-02 11:28 ` [PATCH 3/4] Calculate max VIBDAT code based on VDDVIB, motor and driver resistances Peter Ujfalusi
2011-08-02 11:28 ` Peter Ujfalusi [this message]
2011-08-02 11:32 ` [PATCH 1/3] mfd: twl6040: Add initial support Péter Ujfalusi
2011-08-02 12:36   ` [alsa-devel] " Felipe Balbi
2011-08-02 12:31 ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1312284526-1656-6-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=b-cousson@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=misael.lopez@ti.com \
    --cc=s-guiriec@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.