* [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators
@ 2012-06-20 15:12 Guennadi Liakhovetski
2012-06-20 15:20 ` Paul Mundt
2012-06-20 15:30 ` Guennadi Liakhovetski
0 siblings, 2 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2012-06-20 15:12 UTC (permalink / raw)
To: linux-sh
Until the regulator_register_fixed_volt() function becomes available add a
macro to define fixed-voltage always on regulators.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
---
arch/sh/include/mach-common/mach/regulator.h | 34 ++++++++++++++++++++++++++
1 files changed, 34 insertions(+), 0 deletions(-)
create mode 100644 arch/sh/include/mach-common/mach/regulator.h
diff --git a/arch/sh/include/mach-common/mach/regulator.h b/arch/sh/include/mach-common/mach/regulator.h
new file mode 100644
index 0000000..fe74995
--- /dev/null
+++ b/arch/sh/include/mach-common/mach/regulator.h
@@ -0,0 +1,34 @@
+/*
+ * Temporary header until regulator_register_fixed_volt() is available.
+ * Licensed under GPLv2, see COPYING for details.
+ */
+
+#ifndef ASM_REGULATOR_H
+#define ASM_REGULATOR_H
+
+#include <linux/regulator/driver.h>
+#include <linux/regulator/fixed.h>
+#include <linux/regulator/machine.h>
+
+#define REGULATOR_FIXED(s, rid, v) \
+static struct regulator_init_data fixed_power_init_data_ ## rid = { \
+ .num_consumer_supplies = ARRAY_SIZE(s), \
+ .consumer_supplies = (s), \
+ .constraints.always_on = 1, \
+}; \
+static struct fixed_voltage_config fixed_power_info_ ## rid = { \
+ .supply_name = "Fixed #" # rid, \
+ .microvolts = (v), \
+ .gpio = -EINVAL, \
+ .init_data = &fixed_power_init_data_ ## rid, \
+ .enabled_at_boot = 1, \
+}; \
+static struct platform_device fixed_power_ ## rid = { \
+ .name = "reg-fixed-voltage", \
+ .id = (rid), \
+ .dev = { \
+ .platform_data = &fixed_power_info_ ## rid, \
+ }, \
+}
+
+#endif
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators
2012-06-20 15:12 [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators Guennadi Liakhovetski
@ 2012-06-20 15:20 ` Paul Mundt
2012-06-20 15:30 ` Guennadi Liakhovetski
1 sibling, 0 replies; 3+ messages in thread
From: Paul Mundt @ 2012-06-20 15:20 UTC (permalink / raw)
To: linux-sh
On Wed, Jun 20, 2012 at 05:12:09PM +0200, Guennadi Liakhovetski wrote:
> Until the regulator_register_fixed_volt() function becomes available add a
> macro to define fixed-voltage always on regulators.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Uh, no. If you have a dependency on something in another tree then we
pull that dependency in to a topic branch and layer on top of that.
Contrary to popular belief, a couple of changes in a topic branch in
someone else's tree is hardly a rare occurence, nor does it make you
special.
I can't even begin to imagine at what point making this header started to
look like a good idea, you must really go out of your way to avoid using
git in your workflow.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators
2012-06-20 15:12 [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators Guennadi Liakhovetski
2012-06-20 15:20 ` Paul Mundt
@ 2012-06-20 15:30 ` Guennadi Liakhovetski
1 sibling, 0 replies; 3+ messages in thread
From: Guennadi Liakhovetski @ 2012-06-20 15:30 UTC (permalink / raw)
To: linux-sh
On Thu, 21 Jun 2012, Paul Mundt wrote:
> On Wed, Jun 20, 2012 at 05:12:09PM +0200, Guennadi Liakhovetski wrote:
> > Until the regulator_register_fixed_volt() function becomes available add a
> > macro to define fixed-voltage always on regulators.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> Uh, no. If you have a dependency on something in another tree then we
> pull that dependency in to a topic branch and layer on top of that.
> Contrary to popular belief, a couple of changes in a topic branch in
> someone else's tree is hardly a rare occurence, nor does it make you
> special.
>
> I can't even begin to imagine at what point making this header started to
> look like a good idea, you must really go out of your way to avoid using
> git in your workflow.
Ah, sure, I'd much prefer to use that function directly than to have this
interim solution. Good, that this is also your preferred way of handling
this. Will re-send appropriately.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-20 15:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-20 15:12 [PATCH 01/14] sh: add a temporary macro to define fixed voltage regulators Guennadi Liakhovetski
2012-06-20 15:20 ` Paul Mundt
2012-06-20 15:30 ` Guennadi Liakhovetski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox