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>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	Peter Ujfalusi <peter.ujfalusi@ti.com>
Subject: [PATCH v5 12/18] OMAP4: SDP4430: Add twl6040 vibrator platform support
Date: Mon, 13 Jun 2011 19:37:44 +0300	[thread overview]
Message-ID: <1307983070-2257-13-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1307983070-2257-1-git-send-email-peter.ujfalusi@ti.com>

Add twl4030_vibra platform data, and the needed regulators
for twl6040 vibrator.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |   48 +++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 968029a..266d146 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>
 
@@ -276,11 +277,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 = {
@@ -402,7 +432,25 @@ static struct regulator_init_data sdp4430_vusim = {
 	},
 };
 
+static struct twl4030_vibra_data twl6040_vibra = {
+	.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_audio_data twl6040_audio = {
+	.codec		= NULL,
+	.vibra		= &twl6040_vibra,
+	.audpwron_gpio	= 127,
+	.naudint_irq	= OMAP44XX_IRQ_SYS_2N,
+	.irq_base	= TWL6040_CODEC_IRQ_BASE,
+};
+
 static struct twl4030_platform_data sdp4430_twldata = {
+	.audio		= &twl6040_audio,
 	/* Regulators */
 	.vusim		= &sdp4430_vusim,
 	.vaux1		= &sdp4430_vaux1,
-- 
1.7.5.3


WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Liam Girdwood <lrg@ti.com>, Tony Lindgren <tony@atomide.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Dmitry Torokhov <dmitry.torokhov@>
Cc: linux-input@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org,
	Peter Ujfalusi <peter.ujfalusi@ti.com>
Subject: [PATCH v5 12/18] OMAP4: SDP4430: Add twl6040 vibrator platform support
Date: Mon, 13 Jun 2011 19:37:44 +0300	[thread overview]
Message-ID: <1307983070-2257-13-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1307983070-2257-1-git-send-email-peter.ujfalusi@ti.com>

Add twl4030_vibra platform data, and the needed regulators
for twl6040 vibrator.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 arch/arm/mach-omap2/board-4430sdp.c |   48 +++++++++++++++++++++++++++++++++++
 1 files changed, 48 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 968029a..266d146 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>
 
@@ -276,11 +277,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 = {
@@ -402,7 +432,25 @@ static struct regulator_init_data sdp4430_vusim = {
 	},
 };
 
+static struct twl4030_vibra_data twl6040_vibra = {
+	.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_audio_data twl6040_audio = {
+	.codec		= NULL,
+	.vibra		= &twl6040_vibra,
+	.audpwron_gpio	= 127,
+	.naudint_irq	= OMAP44XX_IRQ_SYS_2N,
+	.irq_base	= TWL6040_CODEC_IRQ_BASE,
+};
+
 static struct twl4030_platform_data sdp4430_twldata = {
+	.audio		= &twl6040_audio,
 	/* Regulators */
 	.vusim		= &sdp4430_vusim,
 	.vaux1		= &sdp4430_vaux1,
-- 
1.7.5.3

  parent reply	other threads:[~2011-06-13 16:38 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 16:37 [PATCH v5 00/18] MFD/ASoC/Input: TWL4030/TWL60X0 changes Peter Ujfalusi
2011-06-13 16:37 ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 01/18] OMAP: New twl-common for common TWL configuration Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 02/18] OMAP4: Move common twl6030 configuration to twl-common Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 03/18] OMAP3: Move common twl " Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 04/18] OMAP3: Move common regulator " Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 05/18] MFD: twl4030-codec: Rename internals from codec to audio Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 06/18] MFD: twl4030-codec -> twl4030-audio: Rename the driver Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 07/18] MFD: twl4030-audio: Rename platform data Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 08/18] mfd: twl6040: Add initial support Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 09/18] ASoC: twl6040: Convert into TWL6040 MFD child Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 10/18] MFD: twl6040: Change platform data for soc codec driver Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 11/18] input: Add initial support for TWL6040 vibrator Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-13 16:37 ` Peter Ujfalusi [this message]
2011-06-13 16:37   ` [PATCH v5 12/18] OMAP4: SDP4430: Add twl6040 vibrator platform support Peter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 13/18] ASoC: twl6040: add all ABE DAIs Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-17 13:29   ` [alsa-devel] " Mark Brown
2011-06-13 16:37 ` [PATCH v5 14/18] ASoC: twl6040: Support other sample rates in constraints Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-17 13:22   ` [alsa-devel] " Mark Brown
2011-06-17 13:09     ` Péter Ujfalusi
2011-06-17 13:09       ` Péter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 15/18] ASoC: twl6040: Remove pll and headset mode dependency Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-17 13:27   ` [alsa-devel] " Mark Brown
2011-06-17 13:04     ` Péter Ujfalusi
2011-06-17 13:04       ` Péter Ujfalusi
2011-06-13 16:37 ` [PATCH v5 16/18] ASoC: twl6040: set default constraints Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-17 13:28   ` [alsa-devel] " Mark Brown
2011-06-17 13:28     ` Mark Brown
2011-06-13 16:37 ` [PATCH v5 17/18] ASoC: twl6040: Configure ramp step based on platform Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi
2011-06-17 13:29   ` [alsa-devel] " Mark Brown
2011-06-17 13:29     ` Mark Brown
2011-06-13 16:37 ` [PATCH v5 18/18] OMAP4: SDP4430: Add twl6040 codec platform support Peter Ujfalusi
2011-06-13 16:37   ` Peter Ujfalusi

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=1307983070-2257-13-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=sameo@linux.intel.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.