From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>,
Liam Girdwood <lrg@slimlogic.co.uk>,
Archit Taneja <archit@ti.com>,
linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/9] OMAP: DSS2: Change DSI platform device name from "omapdss_dsi1" to "omapdss_dsi"
Date: Tue, 07 Jun 2011 14:44:58 +0300 [thread overview]
Message-ID: <1307447098.1858.31.camel@deskari> (raw)
In-Reply-To: <20110511121243.GB5487@opensource.wolfsonmicro.com>
Hi Mark,
Waking up this old thread again.
On Wed, 2011-05-11 at 14:12 +0200, Mark Brown wrote:
> On Wed, May 11, 2011 at 12:23:45PM +0300, Tomi Valkeinen wrote:
>
> > So how should the regulator be set up?
>
> You need to create a new regulator of some kind and then provide a way
> for machines to set the supply_regulator in the init_data.
What should this "new regulator of some kind" be? I was trying out with
fixed regulator, but I'm not quite sure if that's good here.
I don't want a full controllable regulator, but just a virtual "route"
regulator, which mirrors the state of the parent regulator.
(Well, I don't actually want that, I want to dynamically add some
REGULATOR_SUPPLYs to an existing regulator, but afaik that's not
possible.)
Can the fixed regulator be used like that?
Using a new regulator like this also means that there is a dependency
between the new regulator and the used source supply. I haven't solved
this yet, as the twl driver seems to add the regulators at some later
stage.
Below is my test patch for reference. It doesn't do the work in a common
file, so it's just for testing.
Tomi
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 2647a95..fb477f1 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>
@@ -277,10 +278,47 @@ static int omap_ethernet_init(void)
return status;
}
+static struct regulator_consumer_supply fixed_supply[] = {
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dss"),
+ REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
+};
+
+static struct regulator_init_data fixed_reg_init_data = {
+ .supply_regulator = "VCXIO",
+ .constraints = {
+ .min_uV = 1800000,
+ .max_uV = 1800000,
+ .valid_modes_mask = REGULATOR_MODE_NORMAL
+ | REGULATOR_MODE_STANDBY,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE
+ | REGULATOR_CHANGE_STATUS,
+ .always_on = true,
+ },
+ .num_consumer_supplies = ARRAY_SIZE(fixed_supply),
+ .consumer_supplies = fixed_supply,
+};
+
+static struct fixed_voltage_config omap_dss_fixed_reg_data = {
+ .gpio = -EINVAL,
+ .supply_name = "dss-regulator",
+ .init_data = &fixed_reg_init_data,
+ .enabled_at_boot = 1,
+ .microvolts = 1800000,
+};
+
+static struct platform_device omap_dss_fixed_reg_device = {
+ .name = "reg-fixed-voltage",
+ .id = 3,
+ .dev = {
+ .platform_data = &omap_dss_fixed_reg_data,
+ },
+};
+
static struct platform_device *sdp4430_devices[] __initdata = {
&sdp4430_gpio_keys_device,
&sdp4430_leds_gpio,
&sdp4430_leds_pwm,
+ &omap_dss_fixed_reg_device,
};
static struct omap_board_config_kernel sdp4430_config[] __initdata = {
@@ -339,8 +377,6 @@ static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
},
};
static struct regulator_consumer_supply sdp4430_vcxio_supply[] = {
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dss"),
- REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
};
static int omap4_twl6030_hsmmc_late_init(struct device *dev)
next prev parent reply other threads:[~2011-06-07 11:45 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 7:38 [PATCH 0/9] MAP: DSS2: DSI2 for secondary lcd panel on OMAP4 Archit Taneja
2011-05-04 7:38 ` [PATCH 1/9] OMAP: DSS2: Change DSI platform device name from "omapdss_dsi1" to "omapdss_dsi" Archit Taneja
2011-05-04 9:40 ` Tony Lindgren
2011-05-04 10:53 ` Tomi Valkeinen
2011-05-04 11:21 ` Tomi Valkeinen
2011-05-04 12:11 ` Archit Taneja
2011-05-04 12:17 ` Tony Lindgren
2011-05-05 11:36 ` Tomi Valkeinen
2011-05-05 11:50 ` Tony Lindgren
2011-05-05 11:58 ` Tomi Valkeinen
2011-05-05 13:03 ` Tomi Valkeinen
2011-05-05 13:02 ` Mark Brown
2011-05-09 15:34 ` Tomi Valkeinen
2011-05-09 19:19 ` Mark Brown
2011-05-10 12:30 ` Tomi Valkeinen
2011-05-10 13:47 ` Mark Brown
2011-05-11 9:23 ` Tomi Valkeinen
2011-05-11 12:12 ` Mark Brown
2011-06-07 11:44 ` Tomi Valkeinen [this message]
2011-06-07 12:08 ` Mark Brown
2011-06-07 13:11 ` Tomi Valkeinen
2011-06-13 9:54 ` Tomi Valkeinen
2011-06-13 13:27 ` Tony Lindgren
2011-05-04 7:38 ` [PATCH 2/9] OMAP: DSS2: DSI: Add extra omap_dss_device argument in functions exported by dsi Archit Taneja
2011-05-04 7:38 ` [PATCH 3/9] OMAP: DSS2: Remove omap_dss_device argument from dsi_pll_init() Archit Taneja
2011-05-04 7:38 ` [PATCH 4/9] OMAP: DSS2: Pass platform_device as an argument in dsi functions Archit Taneja
2011-05-04 7:38 ` [PATCH 5/9] OMAP: DSS2: DSI: Use platform_device pointer to get dsi data Archit Taneja
2011-05-04 7:38 ` [PATCH 6/9] OMAP: DSS2: DSI: Pass pointer to struct to packet_sent_handler isrs Archit Taneja
2011-05-04 7:38 ` [PATCH 7/9] OMAP4: DSS2: DSI: Changes for DSI2 on OMAP4 Archit Taneja
2011-05-04 7:38 ` [PATCH 8/9] OMAP: DSS2: DSI: Build a platform device instance for DSI2 Archit Taneja
2011-05-04 7:38 ` [PATCH 9/9] OMAP: DSS2: Taal: Use device name in backlight_device_register Archit Taneja
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=1307447098.1858.31.camel@deskari \
--to=tomi.valkeinen@ti.com \
--cc=archit@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox