linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/13] [ARM] pxa/palm: Add core pmic support for Palm27x
Date: Thu, 29 Jul 2010 05:16:19 +0200	[thread overview]
Message-ID: <1280373389-32475-3-git-send-email-marek.vasut@gmail.com> (raw)
In-Reply-To: <1280373389-32475-1-git-send-email-marek.vasut@gmail.com>

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 arch/arm/mach-pxa/palm27x.c |   57 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/palm27x.c b/arch/arm/mach-pxa/palm27x.c
index ff5ee8c..a1009ec 100644
--- a/arch/arm/mach-pxa/palm27x.c
+++ b/arch/arm/mach-pxa/palm27x.c
@@ -21,6 +21,7 @@
 #include <linux/wm97xx.h>
 #include <linux/power_supply.h>
 #include <linux/usb/gpio_vbus.h>
+#include <linux/regulator/max1586.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -35,6 +36,8 @@
 #include <mach/palmasoc.h>
 #include <mach/palm27x.h>
 
+#include <plat/i2c.h>
+
 #include "generic.h"
 #include "devices.h"
 
@@ -458,6 +461,59 @@ static void __init palm27x_power_init(int ac, int usb)
 static inline void palm27x_power_init(int ac, int usb) {}
 #endif
 
+/******************************************************************************
+ * Core power regulator
+ ******************************************************************************/
+#if defined(CONFIG_REGULATOR_MAX1586) || \
+    defined(CONFIG_REGULATOR_MAX1586_MODULE)
+static struct regulator_consumer_supply palm27x_max1587a_consumers[] = {
+	{
+		.supply	= "vcc_core",
+	}
+};
+
+static struct regulator_init_data palm27x_max1587a_v3_info = {
+	.constraints = {
+		.name		= "vcc_core range",
+		.min_uV		= 900000,
+		.max_uV		= 1705000,
+		.always_on	= 1,
+		.valid_ops_mask	= REGULATOR_CHANGE_VOLTAGE,
+	},
+	.consumer_supplies	= palm27x_max1587a_consumers,
+	.num_consumer_supplies	= ARRAY_SIZE(palm27x_max1587a_consumers),
+};
+
+static struct max1586_subdev_data palm27x_max1587a_subdevs[] = {
+	{
+		.name		= "vcc_core",
+		.id		= MAX1586_V3,
+		.platform_data	= &palm27x_max1587a_v3_info,
+	}
+};
+
+static struct max1586_platform_data palm27x_max1587a_info = {
+	.subdevs     = palm27x_max1587a_subdevs,
+	.num_subdevs = ARRAY_SIZE(palm27x_max1587a_subdevs),
+	.v3_gain     = MAX1586_GAIN_R24_3k32, /* 730..1550 mV */
+};
+
+static struct i2c_board_info __initdata palm27x_pi2c_board_info[] = {
+	{
+		I2C_BOARD_INFO("max1586", 0x14),
+		.platform_data	= &palm27x_max1587a_info,
+	},
+};
+
+static void __init palm27x_pmic_init(void)
+{
+	i2c_register_board_info(1, ARRAY_AND_SIZE(palm27x_pi2c_board_info));
+	pxa27x_set_i2c_power_info(NULL);
+}
+#else
+static inline void palm27x_pmic_init(void) {}
+#endif
+
 void __init palm27x_common_init(struct palm27x_handheld *palm)
 {
 	pxa_set_ffuart_info(NULL);
@@ -472,4 +528,5 @@ void __init palm27x_common_init(struct palm27x_handheld *palm)
 	palm27x_ac97_init(palm->batt_minv, palm->batt_maxv, palm->jack_gpio);
 	palm27x_pwm_init(palm->bl_bl, palm->bl_lcd);
 	palm27x_power_init(palm->power_ac, palm->power_usb);
+	palm27x_pmic_init();
 }
-- 
1.7.1

  parent reply	other threads:[~2010-07-29  3:16 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-29  3:16 [PATCH 01/13] [ARM] pxa/palm: Introduce Palm27x Marek Vasut
2010-07-29  3:16 ` [PATCH 02/13] [ARM] pxa/palm: Flip Palm LD,TX,T5,Z72 to Palm27x Marek Vasut
2010-08-04  3:14   ` Eric Miao
2010-07-29  3:16 ` Marek Vasut [this message]
2010-07-29 10:03   ` [PATCH 03/13] [ARM] pxa/palm: Add core pmic support for Palm27x Mike Rapoport
2010-08-04  3:16     ` Eric Miao
2010-07-29  3:16 ` [PATCH 04/13] [ARM] pxa/palm: Modularize rest of code in Palms Marek Vasut
2010-08-04  3:26   ` Eric Miao
2010-07-29  3:16 ` [PATCH 05/13] [ARM] pxa/spitz: Rework spitz Marek Vasut
2010-08-04  5:27   ` Eric Miao
2010-07-29  3:16 ` [PATCH 06/13] [ARM] pxa/spitz: Formating and naming fixes Marek Vasut
2010-08-04  5:27   ` Eric Miao
2010-07-29  3:16 ` [PATCH 07/13] [ARM] pxa/z2: Fix flash layout typo Marek Vasut
2010-08-04  5:36   ` Eric Miao
2010-07-29  3:16 ` [PATCH 08/13] [ARM] pxa/balloon3: Machine file cleanup Marek Vasut
2010-07-29  3:16 ` [PATCH 09/13] " Marek Vasut
2010-07-29  3:16 ` [PATCH 10/13] [ARM] pxa/balloon3: PCMCIA Support Marek Vasut
2010-07-29 10:10   ` Wookey
2010-07-30  4:41     ` Marek Vasut
2010-07-30  5:02       ` Eric Miao
2010-07-30  5:12         ` Marek Vasut
2010-07-30  5:19           ` Eric Miao
2010-07-29  3:16 ` [PATCH 11/13] [ARM] pxa/balloon3: PCF857x GPIO expander and LEDs Marek Vasut
2010-07-29 10:00   ` Wookey
2010-07-30  4:44     ` Marek Vasut
2010-07-30  5:09       ` Eric Miao
2010-07-30  5:19         ` Marek Vasut
2010-07-30  5:21           ` Eric Miao
2010-07-30  9:39       ` Wookey
2010-07-30 12:36         ` Marek Vasut
2010-07-30 12:36           ` Marek Vasut
2010-07-30 13:07             ` Wookey
2010-07-30 13:16               ` Marek Vasut
     [not found]         ` <Prayer.1.3.3.1007301954290.28463@hermes-2.csi.cam.ac.uk>
2010-07-30 19:34           ` [Balloon] " Marek Vasut
2010-07-29  3:16 ` [PATCH 12/13] [ARM] pxa/balloon3: Add NAND driver Marek Vasut
2010-07-29  3:16 ` [PATCH 13/13] [ARM] pxa/balloon3: Add MAX1586 PMIC support Marek Vasut
2010-07-29 10:04 ` [PATCH 01/13] [ARM] pxa/palm: Introduce Palm27x Mike Rapoport
2010-07-29 15:54   ` Marek Vasut
2010-07-29 16:16     ` Mike Rapoport
2010-08-04  3:07     ` Eric Miao

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=1280373389-32475-3-git-send-email-marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).